Skip to content
Snippets Groups Projects
Commit 77a8d0bb authored by Éloïs's avatar Éloïs
Browse files

style: remove xtask warnings (rustc and clippy)

parent 2614f1b4
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
// You should have received a copy of the GNU Affero General Public License // You should have received a copy of the GNU Affero General Public License
// along with Substrate-Libre-Currency. If not, see <https://www.gnu.org/licenses/>. // along with Substrate-Libre-Currency. If not, see <https://www.gnu.org/licenses/>.
use anyhow::{anyhow, bail, Context, Result}; use anyhow::{bail, Context, Result};
use codec::Decode; use codec::Decode;
use scale_info::form::PortableForm; use scale_info::form::PortableForm;
use std::{ use std::{
...@@ -70,18 +70,10 @@ impl CallCategory { ...@@ -70,18 +70,10 @@ impl CallCategory {
} }
} }
fn is_root(pallet_name: &str, call_name: &str) -> bool { fn is_root(pallet_name: &str, call_name: &str) -> bool {
if let Self::Root = Self::is(pallet_name, call_name) { matches!(Self::is(pallet_name, call_name), Self::Root)
true
} else {
false
}
} }
fn is_user(pallet_name: &str, call_name: &str) -> bool { fn is_user(pallet_name: &str, call_name: &str) -> bool {
if let Self::User = Self::is(pallet_name, call_name) { matches!(Self::is(pallet_name, call_name), Self::User)
true
} else {
false
}
} }
} }
...@@ -131,7 +123,6 @@ impl From<&scale_info::Variant<PortableForm>> for Call { ...@@ -131,7 +123,6 @@ impl From<&scale_info::Variant<PortableForm>> for Call {
#[derive(Clone)] #[derive(Clone)]
struct CallParam { struct CallParam {
docs: Vec<String>,
name: String, name: String,
type_name: String, type_name: String,
} }
...@@ -139,7 +130,6 @@ struct CallParam { ...@@ -139,7 +130,6 @@ struct CallParam {
impl From<&scale_info::Field<PortableForm>> for CallParam { impl From<&scale_info::Field<PortableForm>> for CallParam {
fn from(field: &scale_info::Field<PortableForm>) -> Self { fn from(field: &scale_info::Field<PortableForm>) -> Self {
Self { Self {
docs: field.docs().to_vec(),
name: field.name().cloned().unwrap_or_default(), name: field.name().cloned().unwrap_or_default(),
type_name: field.type_name().cloned().unwrap_or_default(), type_name: field.type_name().cloned().unwrap_or_default(),
} }
......
...@@ -64,7 +64,7 @@ fn main() -> Result<()> { ...@@ -64,7 +64,7 @@ fn main() -> Result<()> {
} }
} }
fn build(production: bool) -> Result<()> { fn build(_production: bool) -> Result<()> {
exec_should_success(Command::new("cargo").args(&["clean", "-p", "duniter"]))?; exec_should_success(Command::new("cargo").args(&["clean", "-p", "duniter"]))?;
exec_should_success(Command::new("cargo").args(&["build", "--locked"]))?; exec_should_success(Command::new("cargo").args(&["build", "--locked"]))?;
exec_should_success(Command::new("mkdir").args(&["build"]))?; exec_should_success(Command::new("mkdir").args(&["build"]))?;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment