Fight with warnings
This commit is contained in:
parent
6d0e1fe88c
commit
5013cbfdc0
@ -1,3 +1,6 @@
|
||||
[package]
|
||||
name = "source-stream-0"
|
||||
edition = "2024"
|
||||
edition = "2024"
|
||||
|
||||
[lints]
|
||||
rust = { nonstandard_style = "allow" }
|
||||
@ -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" }
|
||||
@ -1,5 +1,3 @@
|
||||
#![feature(const_for)]
|
||||
|
||||
use crate::{AsciiChar};
|
||||
|
||||
pub const fn asciiLiteral<const S: usize>(
|
||||
@ -9,7 +7,7 @@ pub const fn asciiLiteral<const S: usize>(
|
||||
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);
|
||||
|
||||
@ -5,4 +5,7 @@ edition = "2024"
|
||||
[lib]
|
||||
|
||||
[dependencies]
|
||||
source-stream-0 = { path = ".." }
|
||||
source-stream-0 = { path = ".." }
|
||||
|
||||
[lints]
|
||||
rust = { nonstandard_style = "allow" }
|
||||
@ -170,7 +170,7 @@ pub struct KeywordDeconverted<
|
||||
impl<'keyword, 'converter, C, W: StreamConverter_Char<C>, I: Keyword<W::WC>>
|
||||
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,
|
||||
|
||||
@ -5,4 +5,7 @@ edition = "2024"
|
||||
[lib]
|
||||
|
||||
[dependencies]
|
||||
source-stream-0 = { path = ".." }
|
||||
source-stream-0 = { path = ".." }
|
||||
|
||||
[lints]
|
||||
rust = { nonstandard_style = "allow" }
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
use source_stream_0::{CollectResult, CollectedSubstring, Pos};
|
||||
use std::marker::PhantomData;
|
||||
|
||||
pub trait PosCounter<'pos, C> {
|
||||
type P: Pos<'pos>;
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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> {
|
||||
|
||||
@ -13,7 +13,7 @@ impl Default for IndexPosCounter {
|
||||
impl<C> PosCounter<'static, C> for IndexPosCounter {
|
||||
type P = usize;
|
||||
|
||||
fn update(&mut self, c: C) {
|
||||
fn update(&mut self, _: C) {
|
||||
self.index += 1;
|
||||
}
|
||||
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -10,7 +10,7 @@ impl Default for NopPosCounter {
|
||||
impl<C> PosCounter<'static, C> for NopPosCounter {
|
||||
type P = ();
|
||||
|
||||
fn update(&mut self, c: C) {}
|
||||
fn update(&mut self, _: C) {}
|
||||
|
||||
fn export(&self) {}
|
||||
}
|
||||
|
||||
@ -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>> {
|
||||
|
||||
@ -13,7 +13,7 @@ impl crate::Keyword<char> for &str {
|
||||
&'keyword self,
|
||||
expectedLen: usize,
|
||||
) -> Option<impl crate::KeywordComparatorIterator<'keyword, char>> {
|
||||
if (self.len() != expectedLen) {
|
||||
if self.len() != expectedLen {
|
||||
return Option::None;
|
||||
}
|
||||
|
||||
@ -26,7 +26,7 @@ impl crate::Keyword<char> for &String {
|
||||
&'keyword self,
|
||||
expectedLen: usize,
|
||||
) -> Option<impl crate::KeywordComparatorIterator<'keyword, char>> {
|
||||
if (self.len() != expectedLen) {
|
||||
if self.len() != expectedLen {
|
||||
return Option::None;
|
||||
}
|
||||
|
||||
@ -44,7 +44,7 @@ impl<C: PartialEq> crate::Keyword<C> for &[C] {
|
||||
&'keyword self,
|
||||
expectedLen: usize,
|
||||
) -> Option<impl crate::KeywordComparatorIterator<'keyword, C>> {
|
||||
if (self.len() != expectedLen) {
|
||||
if self.len() != expectedLen {
|
||||
return Option::None;
|
||||
}
|
||||
|
||||
@ -57,7 +57,7 @@ impl<C: PartialEq, const SZ: usize> crate::Keyword<C> for &[C; SZ] {
|
||||
&'keyword self,
|
||||
expectedLen: usize,
|
||||
) -> Option<impl crate::KeywordComparatorIterator<'keyword, C>> {
|
||||
if (self.len() != expectedLen) {
|
||||
if self.len() != expectedLen {
|
||||
return Option::None;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user