From aa3b2a4407b12580dd5934c8aa257d956abbe048 Mon Sep 17 00:00:00 2001 From: Dmitry Savintsev Date: Fri, 11 Feb 2022 15:45:14 +0100 Subject: [PATCH] use edition 2021 --- xtask/Cargo.toml | 2 +- {{project-name}}-common/Cargo.toml | 2 +- {{project-name}}-ebpf/Cargo.toml | 2 +- {{project-name}}/Cargo.toml | 2 +- {{project-name}}/src/main.rs | 2 -- 5 files changed, 4 insertions(+), 6 deletions(-) diff --git a/xtask/Cargo.toml b/xtask/Cargo.toml index 3b50084..fdfe98b 100644 --- a/xtask/Cargo.toml +++ b/xtask/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "xtask" version = "0.1.0" -edition = "2018" +edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/{{project-name}}-common/Cargo.toml b/{{project-name}}-common/Cargo.toml index d82b903..dff716c 100644 --- a/{{project-name}}-common/Cargo.toml +++ b/{{project-name}}-common/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "{{project-name}}-common" version = "0.1.0" -edition = "2018" +edition = "2021" [features] default = [] diff --git a/{{project-name}}-ebpf/Cargo.toml b/{{project-name}}-ebpf/Cargo.toml index 3bbffe6..d00be23 100644 --- a/{{project-name}}-ebpf/Cargo.toml +++ b/{{project-name}}-ebpf/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "{{ project-name }}-ebpf" version = "0.1.0" -edition = "2018" +edition = "2021" [dependencies] aya-bpf = { git = "http://github.com/aya-rs/aya", branch = "main" } diff --git a/{{project-name}}/Cargo.toml b/{{project-name}}/Cargo.toml index a10a7c0..0ce48ef 100644 --- a/{{project-name}}/Cargo.toml +++ b/{{project-name}}/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "{{project-name}}" version = "0.1.0" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/{{project-name}}/src/main.rs b/{{project-name}}/src/main.rs index 8176b85..1c533c0 100644 --- a/{{project-name}}/src/main.rs +++ b/{{project-name}}/src/main.rs @@ -14,7 +14,6 @@ use aya::programs::SockOps; use aya::maps::{MapRefMut,SockHash}; use aya::programs::SkMsg; use {{crate_name}}_common::SockKey; -use std::convert::TryFrom; {%- when "xdp" -%} use anyhow::Context; use aya::programs::{Xdp, XdpFlags}; @@ -31,7 +30,6 @@ use aya::{programs::BtfTracePoint, Btf}; {%- endcase %} use log::info; use simplelog::{ColorChoice, ConfigBuilder, LevelFilter, TermLogger, TerminalMode}; -use std::convert::TryInto; use structopt::StructOpt; use tokio::signal;