Skip to content

Commit 0f16363

Browse files
committed
Appease clippy
See rust-lang/rust#130778. ``` warning: empty line after doc comment --> test/integration-ebpf/build.rs:16:1 | 16 | / /// [bindeps]: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html?highlight=feature#artifact-dependencies 17 | | | |_ 18 | fn main() { | --------- the comment documents this function | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default = help: if the empty line is unintentional remove it error: empty line after doc comment --> aya/src/maps/bloom_filter.rs:34:1 | 34 | / /// ``` 35 | | | |_ ... 38 | pub struct BloomFilter<T, V: Pod> { | --------------------------------- the comment documents this struct | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments note: the lint level is defined here --> aya/src/lib.rs:41:5 | 41 | clippy::all, | ^^^^^^^^^^^ = note: `#[deny(clippy::empty_line_after_doc_comments)]` implied by `#[deny(clippy::all)]` = help: if the empty line is unintentional remove it error: empty line after doc comment --> aya/src/maps/lpm_trie.rs:46:1 | 46 | / /// ``` 47 | | | |_ ... 50 | pub struct LpmTrie<T, K, V> { | --------------------------- the comment documents this struct | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments = help: if the empty line is unintentional remove it warning: empty line after doc comment --> test/integration-test/build.rs:38:1 | 38 | / /// [bindeps]: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html?highlight=feature#artifact-dependencies 39 | | | |_ 40 | fn main() { | --------- the comment documents this function | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default = help: if the empty line is unintentional remove it warning: calling `CStr::new` with a byte string literal --> test/integration-test/src/tests/xdp.rs:45:20 | 45 | .from_name(CStr::from_bytes_with_nul(b"lo\0").unwrap()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"lo"` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals = note: `#[warn(clippy::manual_c_str_literals)]` on by default ```
1 parent 045032b commit 0f16363

File tree

5 files changed

+2
-8
lines changed

5 files changed

+2
-8
lines changed

aya/src/maps/bloom_filter.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ use crate::{
3232
///
3333
/// # Ok::<(), aya::EbpfError>(())
3434
/// ```
35-
3635
#[doc(alias = "BPF_MAP_TYPE_BLOOM_FILTER")]
3736
#[derive(Debug)]
3837
pub struct BloomFilter<T, V: Pod> {

aya/src/maps/lpm_trie.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ use crate::{
4444
/// assert_eq!(value, 2);
4545
/// # Ok::<(), aya::EbpfError>(())
4646
/// ```
47-
4847
#[doc(alias = "BPF_MAP_TYPE_LPM_TRIE")]
4948
#[derive(Debug)]
5049
pub struct LpmTrie<T, K, V> {

test/integration-ebpf/build.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ use xtask::AYA_BUILD_INTEGRATION_BPF;
1414
/// which would likely mean far too much cache invalidation.
1515
///
1616
/// [bindeps]: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html?highlight=feature#artifact-dependencies
17-
1817
fn main() {
1918
println!("cargo:rerun-if-env-changed={}", AYA_BUILD_INTEGRATION_BPF);
2019

test/integration-test/build.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ use xtask::{exec, AYA_BUILD_INTEGRATION_BPF, LIBBPF_DIR};
3636
/// runtime because the stubs are inadequate for actually running the tests.
3737
///
3838
/// [bindeps]: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html?highlight=feature#artifact-dependencies
39-
4039
fn main() {
4140
println!("cargo:rerun-if-env-changed={}", AYA_BUILD_INTEGRATION_BPF);
4241

test/integration-test/src/tests/xdp.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::{ffi::CStr, mem::MaybeUninit, net::UdpSocket, num::NonZeroU32, time::Duration};
1+
use std::{mem::MaybeUninit, net::UdpSocket, num::NonZeroU32, time::Duration};
22

33
use aya::{
44
maps::{Array, CpuMap, XskMap},
@@ -41,9 +41,7 @@ fn af_xdp() {
4141
};
4242

4343
let mut iface = IfInfo::invalid();
44-
iface
45-
.from_name(CStr::from_bytes_with_nul(b"lo\0").unwrap())
46-
.unwrap();
44+
iface.from_name(c"lo").unwrap();
4745
let sock = Socket::with_shared(&iface, &umem).unwrap();
4846

4947
let mut fq_cq = umem.fq_cq(&sock).unwrap(); // Fill Queue / Completion Queue

0 commit comments

Comments
 (0)