diff --git a/Cargo.toml b/Cargo.toml index 08e77ba..f0671d6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,3 +1,6 @@ [package] name = "source-stream-0" -edition = "2024" \ No newline at end of file +edition = "2024" + +[lints] +rust = { nonstandard_style = "allow" } \ No newline at end of file diff --git a/ascii/Cargo.toml b/ascii/Cargo.toml index 3aa5f6c..3389de9 100644 --- a/ascii/Cargo.toml +++ b/ascii/Cargo.toml @@ -10,3 +10,6 @@ edition = "2024" source-stream-0 = { path = ".." } source-stream-0-default-streams-0 = { path = "../default-streams" } source-stream-0-converter-0 = { path = "../converter" } + +[lints] +rust = { nonstandard_style = "allow" } \ No newline at end of file diff --git a/ascii/src/keyword.rs b/ascii/src/keyword.rs index 885c42c..3132e53 100644 --- a/ascii/src/keyword.rs +++ b/ascii/src/keyword.rs @@ -1,5 +1,3 @@ -#![feature(const_for)] - use crate::{AsciiChar}; pub const fn asciiLiteral( @@ -9,7 +7,7 @@ pub const fn asciiLiteral( let mut i = 0usize; while i < S { let a = str[i] as u32; - if (a >= 128) { + if a >= 128 { panic!("Not ascii char in literal"); } out[i] = AsciiChar::ASCII(a as u8); diff --git a/converter/Cargo.toml b/converter/Cargo.toml index 3bb2fe5..d94473f 100644 --- a/converter/Cargo.toml +++ b/converter/Cargo.toml @@ -5,4 +5,7 @@ edition = "2024" [lib] [dependencies] -source-stream-0 = { path = ".." } \ No newline at end of file +source-stream-0 = { path = ".." } + +[lints] +rust = { nonstandard_style = "allow" } \ No newline at end of file diff --git a/converter/src/lib.rs b/converter/src/lib.rs index 3179004..67193c4 100644 --- a/converter/src/lib.rs +++ b/converter/src/lib.rs @@ -170,7 +170,7 @@ pub struct KeywordDeconverted< impl<'keyword, 'converter, C, W: StreamConverter_Char, I: Keyword> KeywordDeconverted<'keyword, 'converter, C, W, I> { - fn unwrap(kw: &'keyword I, converter: &'converter W) -> Self { + pub fn unwrap(kw: &'keyword I, converter: &'converter W) -> Self { return KeywordDeconverted { _orig: kw, _converter: converter, diff --git a/default-streams/Cargo.toml b/default-streams/Cargo.toml index 4f7153e..04065fd 100644 --- a/default-streams/Cargo.toml +++ b/default-streams/Cargo.toml @@ -5,4 +5,7 @@ edition = "2024" [lib] [dependencies] -source-stream-0 = { path = ".." } \ No newline at end of file +source-stream-0 = { path = ".." } + +[lints] +rust = { nonstandard_style = "allow" } diff --git a/default-streams/src/_sandbox.rs b/default-streams/src/_sandbox.rs index 3bede8a..6075e0c 100644 --- a/default-streams/src/_sandbox.rs +++ b/default-streams/src/_sandbox.rs @@ -1,6 +1,6 @@ -use source_stream_0::{CollectedSubstring, Pos, SourceStream}; -use crate::iterators::{ArraySourceIterator, StrSourceIterator}; -use crate::pos::{IndexPosCounter, NewLinePosCounter, PosLineCol}; +use source_stream_0::{SourceStream}; +use crate::iterators::{ArraySourceIterator}; +use crate::pos::{IndexPosCounter}; use crate::SourceIterator; #[test] diff --git a/default-streams/src/iterator.rs b/default-streams/src/iterator.rs index 820e9e5..b3b078c 100644 --- a/default-streams/src/iterator.rs +++ b/default-streams/src/iterator.rs @@ -1,5 +1,4 @@ use source_stream_0::{CollectResult, CollectedSubstring, Pos}; -use std::marker::PhantomData; pub trait PosCounter<'pos, C> { type P: Pos<'pos>; diff --git a/default-streams/src/iterators/array.rs b/default-streams/src/iterators/array.rs index 7250cf7..0038b9c 100644 --- a/default-streams/src/iterators/array.rs +++ b/default-streams/src/iterators/array.rs @@ -1,6 +1,6 @@ use crate::_SourceIteratorCollect; use crate::iterator::{PosCounter, SourceIterator}; -use source_stream_0::{CollectResult, CollectedSubstring, Keyword, KeywordComparatorIterator, Pos}; +use source_stream_0::{CollectResult, CollectedSubstring, Keyword, KeywordComparatorIterator}; use std::marker::PhantomData; use std::slice::Iter; diff --git a/default-streams/src/iterators/str.rs b/default-streams/src/iterators/str.rs index 4e9ea78..5876ae1 100644 --- a/default-streams/src/iterators/str.rs +++ b/default-streams/src/iterators/str.rs @@ -36,7 +36,7 @@ pub struct StrSourceIterator<'source, 'pos, PC: PosCounter<'pos, char>> { _posRaw: usize, _posCodePoints: usize, _posHighlevel: PC, - __phantom: PhantomData<(&'pos ())>, + __phantom: PhantomData<&'pos ()>, } impl<'source, 'pos, PC: PosCounter<'pos, char>> StrSourceIterator<'source, 'pos, PC> { diff --git a/default-streams/src/pos/index.rs b/default-streams/src/pos/index.rs index 4c7bc5b..9598479 100644 --- a/default-streams/src/pos/index.rs +++ b/default-streams/src/pos/index.rs @@ -13,7 +13,7 @@ impl Default for IndexPosCounter { impl PosCounter<'static, C> for IndexPosCounter { type P = usize; - fn update(&mut self, c: C) { + fn update(&mut self, _: C) { self.index += 1; } diff --git a/default-streams/src/pos/newline.rs b/default-streams/src/pos/newline.rs index 6dc3cd7..93e0621 100644 --- a/default-streams/src/pos/newline.rs +++ b/default-streams/src/pos/newline.rs @@ -1,7 +1,5 @@ -use std::marker::PhantomData; use crate::iterator::PosCounter; use source_stream_0::Pos; -use crate::pos::IndexPosCounter; pub struct PosLineCol { pub row: usize, diff --git a/default-streams/src/pos/nop.rs b/default-streams/src/pos/nop.rs index 6aa58be..adf753c 100644 --- a/default-streams/src/pos/nop.rs +++ b/default-streams/src/pos/nop.rs @@ -10,7 +10,7 @@ impl Default for NopPosCounter { impl PosCounter<'static, C> for NopPosCounter { type P = (); - fn update(&mut self, c: C) {} + fn update(&mut self, _: C) {} fn export(&self) {} } diff --git a/default-streams/src/stream.rs b/default-streams/src/stream.rs index 5c755d2..37cf9ea 100644 --- a/default-streams/src/stream.rs +++ b/default-streams/src/stream.rs @@ -1,6 +1,6 @@ use crate::_SourceIteratorCollect; use crate::iterator::SourceIterator; -use source_stream_0::{CollectResult, CollectedSubstring, Predicate, SourceStream}; +use source_stream_0::{CollectResult, Predicate, SourceStream}; use std::marker::PhantomData; pub struct SourceStreamOverIterator<'source, 'pos, I: SourceIterator<'source, 'pos>> { diff --git a/src/_keyword_impls.rs b/src/_keyword_impls.rs index 368ba67..b422fdf 100644 --- a/src/_keyword_impls.rs +++ b/src/_keyword_impls.rs @@ -13,7 +13,7 @@ impl crate::Keyword for &str { &'keyword self, expectedLen: usize, ) -> Option> { - if (self.len() != expectedLen) { + if self.len() != expectedLen { return Option::None; } @@ -26,7 +26,7 @@ impl crate::Keyword for &String { &'keyword self, expectedLen: usize, ) -> Option> { - if (self.len() != expectedLen) { + if self.len() != expectedLen { return Option::None; } @@ -44,7 +44,7 @@ impl crate::Keyword for &[C] { &'keyword self, expectedLen: usize, ) -> Option> { - if (self.len() != expectedLen) { + if self.len() != expectedLen { return Option::None; } @@ -57,7 +57,7 @@ impl crate::Keyword for &[C; SZ] { &'keyword self, expectedLen: usize, ) -> Option> { - if (self.len() != expectedLen) { + if self.len() != expectedLen { return Option::None; }