• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

butlergroup / rust-libp2p / 18605813685

17 Oct 2025 09:59PM UTC coverage: 77.784% (+2.9%) from 74.891%
18605813685

push

github

butlergroup
	modified:   .github/workflows/ci.yml
	modified:   protocols/autonat/src/lib.rs

39259 of 50472 relevant lines covered (77.78%)

35884.32 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

87.5
/misc/quick-protobuf-codec/src/generated/test.rs
1
// Automatically generated rust module for 'test.proto' file
2

3
#![allow(non_snake_case)]
4
#![allow(non_upper_case_globals)]
5
#![allow(non_camel_case_types)]
6
#![allow(unused_imports)]
7
#![allow(unknown_lints)]
8
#![allow(clippy::all)]
9
#![cfg_attr(rustfmt, rustfmt_skip)]
10

11

12
use quick_protobuf::{MessageInfo, MessageRead, MessageWrite, BytesReader, Writer, WriterBackend, Result};
13
use quick_protobuf::sizeofs::*;
14
use super::*;
15

16
#[allow(clippy::derive_partial_eq_without_eq)]
17
#[derive(Debug, Default, PartialEq, Clone)]
18
pub struct Message {
19
    pub data: Vec<u8>,
20
}
21

22
impl<'a> MessageRead<'a> for Message {
23
    fn from_reader(r: &mut BytesReader, bytes: &'a [u8]) -> Result<Self> {
100✔
24
        let mut msg = Self::default();
100✔
25
        while !r.is_eof() {
200✔
26
            match r.next_tag(bytes) {
100✔
27
                Ok(10) => msg.data = r.read_bytes(bytes)?.to_owned(),
100✔
28
                Ok(t) => { r.read_unknown(bytes, t)?; }
×
29
                Err(e) => return Err(e),
×
30
            }
31
        }
32
        Ok(msg)
100✔
33
    }
100✔
34
}
35

36
impl MessageWrite for Message {
37
    fn get_size(&self) -> usize {
101✔
38
        0
39
        + if self.data.is_empty() { 0 } else { 1 + sizeof_len((&self.data).len()) }
101✔
40
    }
101✔
41

42
    fn write_message<W: WriterBackend>(&self, w: &mut Writer<W>) -> Result<()> {
101✔
43
        if !self.data.is_empty() { w.write_with_tag(10, |w| w.write_bytes(&**&self.data))?; }
101✔
44
        Ok(())
101✔
45
    }
101✔
46
}
47

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc