all: set rust edition to 2024
This commit is contained in:
parent
02a18f620b
commit
3338909170
515 changed files with 1225 additions and 1187 deletions
|
|
@ -1,5 +1,5 @@
|
|||
use {
|
||||
anyhow::{bail, Context, Result},
|
||||
anyhow::{Context, Result, bail},
|
||||
bstr::{BString, ByteSlice},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use {
|
||||
crate::open,
|
||||
anyhow::{anyhow, bail, Context},
|
||||
anyhow::{Context, anyhow, bail},
|
||||
shaderc::{CompileOptions, ResolvedInclude},
|
||||
std::{io::Write, path::Path},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use {
|
||||
crate::open,
|
||||
anyhow::{bail, Context, Result},
|
||||
anyhow::{Context, Result, bail},
|
||||
std::{fs::DirEntry, io::Write, os::unix::ffi::OsStrExt},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
use {
|
||||
crate::{
|
||||
open,
|
||||
tokens::{tokenize, Lined, Symbol, Token, TokenKind, TreeDelim},
|
||||
tokens::{Lined, Symbol, Token, TokenKind, TreeDelim, tokenize},
|
||||
},
|
||||
anyhow::{bail, Context, Result},
|
||||
anyhow::{Context, Result, bail},
|
||||
bstr::{BStr, BString, ByteSlice},
|
||||
std::{
|
||||
collections::{hash_map::Entry, HashMap},
|
||||
collections::{HashMap, hash_map::Entry},
|
||||
io::Write,
|
||||
os::unix::ffi::OsStrExt,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
use {
|
||||
crate::{
|
||||
open,
|
||||
tokens::{tokenize, Symbol, Token, TokenKind, TreeDelim},
|
||||
tokens::{Symbol, Token, TokenKind, TreeDelim, tokenize},
|
||||
},
|
||||
anyhow::{bail, Context, Result},
|
||||
anyhow::{Context, Result, bail},
|
||||
std::{fs::DirEntry, io::Write, os::unix::ffi::OsStrExt},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
use {
|
||||
crate::{
|
||||
open,
|
||||
tokens::{tokenize, Symbol, Token, TokenKind, TreeDelim},
|
||||
tokens::{Symbol, Token, TokenKind, TreeDelim, tokenize},
|
||||
},
|
||||
anyhow::{bail, Context, Result},
|
||||
anyhow::{Context, Result, bail},
|
||||
bstr::ByteSlice,
|
||||
std::{cell::Cell, collections::HashMap, io::Write, mem, os::unix::ffi::OsStrExt, rc::Rc},
|
||||
};
|
||||
|
|
@ -1171,7 +1171,10 @@ fn format_enum<F: Write>(f: &mut F, s: &Enum, protocols: &Protocols) -> Result<(
|
|||
writeln!(f, " }}")?;
|
||||
writeln!(f, " }}")?;
|
||||
writeln!(f)?;
|
||||
writeln!(f, " pub fn deserialize(parser: &mut Parser{lt_a}, value: u32) -> Result<Self, XconError> {{")?;
|
||||
writeln!(
|
||||
f,
|
||||
" pub fn deserialize(parser: &mut Parser{lt_a}, value: u32) -> Result<Self, XconError> {{"
|
||||
)?;
|
||||
writeln!(f, " let res = match value {{")?;
|
||||
for field in &s.variants {
|
||||
writeln!(
|
||||
|
|
@ -1233,7 +1236,10 @@ fn format_bitmask<F: Write>(f: &mut F, s: &Bitmask, protocols: &Protocols) -> Re
|
|||
writeln!(f, " formatter.write_bytes(&bytes[..pos]);")?;
|
||||
writeln!(f, " }}")?;
|
||||
writeln!(f)?;
|
||||
writeln!(f, " pub fn deserialize(&self, parser: &mut Parser, bitmask: u32) -> Result<Self, XconError> {{")?;
|
||||
writeln!(
|
||||
f,
|
||||
" pub fn deserialize(&self, parser: &mut Parser, bitmask: u32) -> Result<Self, XconError> {{"
|
||||
)?;
|
||||
writeln!(
|
||||
f,
|
||||
" let b = parser.read_slice(bitmask.count_ones() as usize * 4)?;"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue