1
Fork 0

Reformat use declarations.

The previous commit updated `rustfmt.toml` appropriately. This commit is
the outcome of running `x fmt --all` with the new formatting options.
This commit is contained in:
Nicholas Nethercote 2024-07-29 08:13:50 +10:00
parent 118f9350c5
commit 84ac80f192
1865 changed files with 8367 additions and 9199 deletions

View file

@ -1,9 +1,8 @@
use crate::opaque::MemDecoder;
use crate::serialize::Decoder;
// This code is very hot and uses lots of arithmetic, avoid overflow checks for performance.
// See https://github.com/rust-lang/rust/pull/119440#issuecomment-1874255727
use crate::int_overflow::DebugStrictAdd;
use crate::opaque::MemDecoder;
use crate::serialize::Decoder;
/// Returns the length of the longest LEB128 encoding for `T`, assuming `T` is an integer type
pub const fn max_leb128_len<T>() -> usize {

View file

@ -1,15 +1,14 @@
use crate::leb128;
use crate::serialize::{Decodable, Decoder, Encodable, Encoder};
use std::fs::File;
use std::io::{self, Write};
use std::marker::PhantomData;
use std::ops::Range;
use std::path::Path;
use std::path::PathBuf;
use std::path::{Path, PathBuf};
// This code is very hot and uses lots of arithmetic, avoid overflow checks for performance.
// See https://github.com/rust-lang/rust/pull/119440#issuecomment-1874255727
use crate::int_overflow::DebugStrictAdd;
use crate::leb128;
use crate::serialize::{Decodable, Decoder, Encodable, Encoder};
// -----------------------------------------------------------------------------
// Encoder

View file

@ -1,6 +1,5 @@
//! Support code for encoding and decoding types.
use smallvec::{Array, SmallVec};
use std::borrow::Cow;
use std::cell::{Cell, RefCell};
use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet, VecDeque};
@ -10,6 +9,8 @@ use std::num::NonZero;
use std::path;
use std::rc::Rc;
use std::sync::Arc;
use smallvec::{Array, SmallVec};
use thin_vec::ThinVec;
/// A byte that [cannot occur in UTF8 sequences][utf8]. Used to mark the end of a string.