diff --git a/trixy-macros/src/config/mod.rs b/trixy-macros/src/config/mod.rs index 89b62a8..71848af 100644 --- a/trixy-macros/src/config/mod.rs +++ b/trixy-macros/src/config/mod.rs @@ -19,7 +19,6 @@ * If not, see . */ - //! This module is responsible for the config passed to trixy. //! It works using the popular builder syntax: //! ```no_run diff --git a/trixy-macros/src/generate/c_api/header/mod.rs b/trixy-macros/src/generate/c_api/header/mod.rs index 63f0971..f763da0 100644 --- a/trixy-macros/src/generate/c_api/header/mod.rs +++ b/trixy-macros/src/generate/c_api/header/mod.rs @@ -19,7 +19,6 @@ * If not, see . */ - //! This module generates the c header //! It works by firstly listing the functions and then by grouping them into structures, effectively //! simulating namespaces in c. diff --git a/trixy-macros/src/generate/c_api/header/structs_init.rs b/trixy-macros/src/generate/c_api/header/structs_init.rs index e3d2212..8b974cd 100644 --- a/trixy-macros/src/generate/c_api/header/structs_init.rs +++ b/trixy-macros/src/generate/c_api/header/structs_init.rs @@ -21,10 +21,10 @@ use proc_macro2::TokenStream as TokenStream2; use quote::format_ident; -use trixy_parser::command_spec::{CommandSpec, Namespace, Identifier, Function}; use quote::quote; +use trixy_parser::command_spec::{CommandSpec, Function, Identifier, Namespace}; -use crate::generate::{identifier_to_rust, c_api::mangle_c_function_ident}; +use crate::generate::{c_api::mangle_c_function_ident, identifier_to_rust}; pub fn generate(trixy: &CommandSpec) -> String { let struct_initializer: TokenStream2 = trixy @@ -83,4 +83,3 @@ fn namespace_to_struct_init(namespace: &Namespace) -> TokenStream2 { . #ident = #ident , } } - diff --git a/trixy-macros/src/generate/c_api/host.rs b/trixy-macros/src/generate/c_api/host.rs index 75055ae..1ca44c3 100644 --- a/trixy-macros/src/generate/c_api/host.rs +++ b/trixy-macros/src/generate/c_api/host.rs @@ -19,7 +19,6 @@ * If not, see . */ - use convert_case::{Case, Casing}; use proc_macro2::TokenStream as TokenStream2; use quote::{format_ident, quote}; diff --git a/trixy-macros/src/generate/c_api/mod.rs b/trixy-macros/src/generate/c_api/mod.rs index 433baa3..484a3b1 100644 --- a/trixy-macros/src/generate/c_api/mod.rs +++ b/trixy-macros/src/generate/c_api/mod.rs @@ -19,7 +19,6 @@ * If not, see . */ - use convert_case::{Case, Casing}; use proc_macro2::{Ident, TokenStream as TokenStream2}; use quote::{format_ident, quote}; diff --git a/trixy-macros/src/generate/host/mod.rs b/trixy-macros/src/generate/host/mod.rs index d3fd3db..b0a182e 100644 --- a/trixy-macros/src/generate/host/mod.rs +++ b/trixy-macros/src/generate/host/mod.rs @@ -19,7 +19,6 @@ * If not, see . */ - //! This module is responsible for generating the rust code used to interface with the api. //! That includes the structs and enums declared in the trixy file and the enum used to describe the //! command being executed. diff --git a/trixy-macros/src/generate/mod.rs b/trixy-macros/src/generate/mod.rs index a62a087..0db6789 100644 --- a/trixy-macros/src/generate/mod.rs +++ b/trixy-macros/src/generate/mod.rs @@ -19,7 +19,6 @@ * If not, see . */ - use proc_macro2::TokenStream as TokenStream2; use quote::{format_ident, quote}; use trixy_parser::command_spec::{CommandSpec, Function, Identifier, NamedType, Type}; diff --git a/trixy-macros/src/lib.rs b/trixy-macros/src/lib.rs index 81ce6b3..e17ca07 100644 --- a/trixy-macros/src/lib.rs +++ b/trixy-macros/src/lib.rs @@ -19,7 +19,6 @@ * If not, see . */ - use std::{ env, fs::{self, File}, diff --git a/trixy-parser/src/bin/trixy-parser.rs b/trixy-parser/src/bin/trixy-parser.rs index e3f616e..9eb5e7e 100644 --- a/trixy-parser/src/bin/trixy-parser.rs +++ b/trixy-parser/src/bin/trixy-parser.rs @@ -19,7 +19,6 @@ * If not, see . */ - use std::{fs, path::PathBuf, process::exit}; use clap::{Parser, Subcommand}; diff --git a/trixy-parser/src/command_spec/checked.rs b/trixy-parser/src/command_spec/checked.rs index acdb449..262b59d 100644 --- a/trixy-parser/src/command_spec/checked.rs +++ b/trixy-parser/src/command_spec/checked.rs @@ -19,7 +19,6 @@ * If not, see . */ - //! This module contains the already type checked types. use std::fmt::{Display, Write}; diff --git a/trixy-parser/src/command_spec/mod.rs b/trixy-parser/src/command_spec/mod.rs index 032c0b3..d8ce1e2 100644 --- a/trixy-parser/src/command_spec/mod.rs +++ b/trixy-parser/src/command_spec/mod.rs @@ -19,7 +19,6 @@ * If not, see . */ - //! This module provides the type definitions for the parser. //! These types are split into type-checked ones [`checked`] and the raw types [`unchecked`] diff --git a/trixy-parser/src/command_spec/unchecked.rs b/trixy-parser/src/command_spec/unchecked.rs index 79d463f..8c0c67e 100644 --- a/trixy-parser/src/command_spec/unchecked.rs +++ b/trixy-parser/src/command_spec/unchecked.rs @@ -19,7 +19,6 @@ * If not, see . */ - //! This module contains the not type checked types. //! These are generated on the first pass of the parser, to be later converted into the checked //! ones. diff --git a/trixy-parser/src/error.rs b/trixy-parser/src/error.rs index 0de2c7d..b865754 100644 --- a/trixy-parser/src/error.rs +++ b/trixy-parser/src/error.rs @@ -19,7 +19,6 @@ * If not, see . */ - use core::fmt; use thiserror::Error; diff --git a/trixy-parser/src/lexing/error.rs b/trixy-parser/src/lexing/error.rs index 9486c1f..fe81f1b 100644 --- a/trixy-parser/src/lexing/error.rs +++ b/trixy-parser/src/lexing/error.rs @@ -19,7 +19,6 @@ * If not, see . */ - use std::{error::Error, fmt::Display}; use thiserror::Error; diff --git a/trixy-parser/src/lexing/mod.rs b/trixy-parser/src/lexing/mod.rs index f79b7ae..b0a69e1 100644 --- a/trixy-parser/src/lexing/mod.rs +++ b/trixy-parser/src/lexing/mod.rs @@ -19,7 +19,6 @@ * If not, see . */ - use std::fmt::Display; use self::{error::SpannedLexingError, tokenizer::Tokenizer}; diff --git a/trixy-parser/src/lexing/test.rs b/trixy-parser/src/lexing/test.rs index 4ae1ec0..9112712 100644 --- a/trixy-parser/src/lexing/test.rs +++ b/trixy-parser/src/lexing/test.rs @@ -19,7 +19,6 @@ * If not, see . */ - use crate::lexing::{Keyword, Token, TokenKind, TokenSpan}; use super::TokenStream; diff --git a/trixy-parser/src/lexing/tokenizer.rs b/trixy-parser/src/lexing/tokenizer.rs index f883708..cb8a6d6 100644 --- a/trixy-parser/src/lexing/tokenizer.rs +++ b/trixy-parser/src/lexing/tokenizer.rs @@ -19,7 +19,6 @@ * If not, see . */ - // This code is heavily inspired by: https://michael-f-bryan.github.io/static-analyser-in-rust/book/lex.html use crate::{ diff --git a/trixy-parser/src/lib.rs b/trixy-parser/src/lib.rs index 392b8ce..493b40b 100644 --- a/trixy-parser/src/lib.rs +++ b/trixy-parser/src/lib.rs @@ -19,7 +19,6 @@ * If not, see . */ - use error::TrixyError; use crate::lexing::TokenStream; diff --git a/trixy-parser/src/parsing/checked/error.rs b/trixy-parser/src/parsing/checked/error.rs index 59350e0..38498ea 100644 --- a/trixy-parser/src/parsing/checked/error.rs +++ b/trixy-parser/src/parsing/checked/error.rs @@ -19,7 +19,6 @@ * If not, see . */ - use thiserror::Error; use std::{error::Error, fmt::Display}; diff --git a/trixy-parser/src/parsing/checked/mod.rs b/trixy-parser/src/parsing/checked/mod.rs index 5729de0..d95e361 100644 --- a/trixy-parser/src/parsing/checked/mod.rs +++ b/trixy-parser/src/parsing/checked/mod.rs @@ -19,7 +19,6 @@ * If not, see . */ - use std::mem; use convert_case::{Case, Casing}; diff --git a/trixy-parser/src/parsing/checked/test.rs b/trixy-parser/src/parsing/checked/test.rs index 1f6eb23..a0468cd 100644 --- a/trixy-parser/src/parsing/checked/test.rs +++ b/trixy-parser/src/parsing/checked/test.rs @@ -19,7 +19,6 @@ * If not, see . */ - use crate::command_spec::checked::{ Attribute, CommandSpec, DocIdentifier, DocNamedType, Enumeration, Function, Identifier, NamedType, Namespace, Structure, Type, diff --git a/trixy-parser/src/parsing/mod.rs b/trixy-parser/src/parsing/mod.rs index 1afacce..a1a3e2b 100644 --- a/trixy-parser/src/parsing/mod.rs +++ b/trixy-parser/src/parsing/mod.rs @@ -19,6 +19,5 @@ * If not, see . */ - pub mod checked; pub mod unchecked; diff --git a/trixy-parser/src/parsing/unchecked/error.rs b/trixy-parser/src/parsing/unchecked/error.rs index 1b77042..1047f16 100644 --- a/trixy-parser/src/parsing/unchecked/error.rs +++ b/trixy-parser/src/parsing/unchecked/error.rs @@ -19,7 +19,6 @@ * If not, see . */ - use std::{error::Error, fmt::Display}; use thiserror::Error; diff --git a/trixy-parser/src/parsing/unchecked/mod.rs b/trixy-parser/src/parsing/unchecked/mod.rs index 7cec55f..153ff74 100644 --- a/trixy-parser/src/parsing/unchecked/mod.rs +++ b/trixy-parser/src/parsing/unchecked/mod.rs @@ -19,7 +19,6 @@ * If not, see . */ - use std::mem; use crate::{ diff --git a/trixy-parser/src/parsing/unchecked/test.rs b/trixy-parser/src/parsing/unchecked/test.rs index ea2feab..a44c602 100644 --- a/trixy-parser/src/parsing/unchecked/test.rs +++ b/trixy-parser/src/parsing/unchecked/test.rs @@ -19,7 +19,6 @@ * If not, see . */ - use pretty_assertions::assert_eq; use crate::{ diff --git a/trixy-types/src/error/mod.rs b/trixy-types/src/error/mod.rs index 89f8721..7d739ed 100644 --- a/trixy-types/src/error/mod.rs +++ b/trixy-types/src/error/mod.rs @@ -19,7 +19,6 @@ * If not, see . */ - use std::ffi::c_char; use thiserror::Error; diff --git a/trixy-types/src/lib.rs b/trixy-types/src/lib.rs index e3f0499..b538184 100644 --- a/trixy-types/src/lib.rs +++ b/trixy-types/src/lib.rs @@ -19,7 +19,6 @@ * If not, see . */ - //! Trixy contains the types used by the [`trixy-macros`] crate to provide ffi safe types pub mod error; pub mod traits; diff --git a/trixy-types/src/traits/errno.rs b/trixy-types/src/traits/errno.rs index 9f1e6bf..985d70a 100644 --- a/trixy-types/src/traits/errno.rs +++ b/trixy-types/src/traits/errno.rs @@ -19,7 +19,6 @@ * If not, see . */ - use core::slice; use std::{ cell::RefCell, diff --git a/trixy-types/src/traits/mod.rs b/trixy-types/src/traits/mod.rs index b48b3b0..b06ca91 100644 --- a/trixy-types/src/traits/mod.rs +++ b/trixy-types/src/traits/mod.rs @@ -19,7 +19,6 @@ * If not, see . */ - pub mod convert_trait; pub mod errno; mod try_from_impl;