Skip to content

Commit d29ef8a

Browse files
d-e-s-oanakryiko
authored andcommitted
examples/rust/profile: Use edition 2021
Switch the profile example over to using Rust edition 2021 for the latest and greatest. Signed-off-by: Daniel Müller <deso@posteo.net>
1 parent 381dd82 commit d29ef8a

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

examples/rust/profile/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name = "profile"
33
version = "0.1.0"
44
authors = ["Kuifeng Lee <kuifeng@fb.com>"]
55
license = "GPL-2.0 OR BSD-3-Clause"
6+
edition = "2021"
67

78
[dependencies]
89
libbpf-rs = "0.19"

examples/rust/profile/src/main.rs

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,18 @@ use std::mem;
66
use std::result::Result;
77
use std::time::Duration;
88

9-
extern crate nix;
10-
use nix::unistd::close;
11-
12-
extern crate libbpf_rs;
9+
use blazesym::symbolize;
1310

14-
extern crate clap;
1511
use clap::Parser;
1612

13+
use nix::unistd::close;
14+
1715
#[path = "bpf/.output/profile.skel.rs"]
1816
mod profile;
19-
use profile::*;
20-
21-
extern crate blazesym;
22-
use blazesym::symbolize;
23-
24-
extern crate libc;
25-
2617
mod syscall;
2718

19+
use profile::*;
20+
2821
const MAX_STACK_DEPTH: usize = 128;
2922
const TASK_COMM_LEN: usize = 16;
3023

0 commit comments

Comments
 (0)