Closed jeikabu closed 4 years ago
why are you using https://github.com/jeikabu/nng-rust.git
as a submodule? You could just use it as a crate:
[dependencies]
nng-rust = { git = "https://github.com/jeikabu/nng-rust.git" }
No reason in particular. Guess I didn't feel adventurous in figuring out how easy it would be to make changes, deal with the sub-submodule, etc. =) . And making it work with CI.
:exclamation: No coverage uploaded for pull request base (
master@8eeef46
). Click here to learn what that means. The diff coverage is93.85%
.
@@ Coverage Diff @@
## master #36 +/- ##
========================================
Coverage ? 92.1%
========================================
Files ? 49
Lines ? 2356
Branches ? 0
========================================
Hits ? 2170
Misses ? 186
Partials ? 0
Impacted Files | Coverage Δ | |
---|---|---|
runng/src/lib.rs | 83.33% <ø> (ø) |
|
runng/src/protocol/pull0.rs | 100% <100%> (ø) |
|
runng/src/protocol/pair1.rs | 100% <100%> (ø) |
|
runng/src/protocol/pub0.rs | 100% <100%> (ø) |
|
runng/src/listener.rs | 100% <100%> (ø) |
|
runng/tests/tests/msg_tests.rs | 100% <100%> (ø) |
|
runng/src/protocol/sub0.rs | 100% <100%> (ø) |
|
runng/src/protocol/push0.rs | 100% <100%> (ø) |
|
runng/src/protocol/pair0.rs | 100% <100%> (ø) |
|
runng/src/factory.rs | 100% <100%> (ø) |
|
... and 39 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 8eeef46...ce4c699. Read the comment docs.
Breaking Changes (relative to 0.1/0.2)
runng-sys:
enum
(instead ofconst int
)build-bindgen
featurerunng:
NngResult
->Result
,NngFail
->Error
,NngReturn
->Result<()>
,factory::Compat
andfactory::Latest
are nowfactory::compat::ProtocolFactory
andfactory::latest::ProtocolFactory
fn from_i32(value: i32) -> Result<()>
are nowfn try_from(value: i32) -> Result<Self, TryFromIntError>
for std::convert::TryFrom that stabilized in Rust 1.34NNG_ESYSERR
andNNG_ETRANERR
are not inenum NngErrno
they are handled asError::SysErr()
andError::TranErr()
insert(&mut self, data: *const u8, ...)
are nowinsert_ptr(...)
getopt
/setopt
functions replaced with shorterget
/set
versionsfn func(self) -> Result<Self>
vsfn func(&mut self) -> Result<&mut Self>
SetOpts
methods (e.g.set_bool
) are-> Result<&mut Self>
instead of-> Result<()>
to facilitate chaininglisten()
anddial()
fromListen
andDial
traits no longer consumeself
create
/open
(likenew
anddefault
) methods return new objects, everything else takes and returns references (i.e.Result<&mut Self>
). SeeSocket::with
for helper to create "one-liners".Non-Breaking Changes:
runng-sys:
#[derive(Default)]
nng-supplemental
/nng-compat
features)runng:
Alloc
to wrap memory allocations made withnng_alloc()
#[derive(Debug)
, all socketsderive(Clone)
, NngMsg and Alloc areAsRef/AsMut<[u8]>
, NngMsg/Alloc/String arePartialEq
NNG_FLAG_ALLOC
andNNG_FLAG_NONBLOCK
as_slice(&self) -> &[u8]
,as_mut_slice(&mut self) -> &mut [u8]
,fn insert_slice(&mut self, data: &[u8])
, etc.nng_iov
) and stream API (nng_stream_*
)SetOpts
trait hasset_duration(..., _: std::time::Duration)
convenience methodtrait GetSocket
is for types that are associated with and expose a socket (NngSocket
),trait Socket
is for types which are a socket