chore(rustfmt): use nightly (#2325)
Stable rustfmt lacks a lot of features resulting in worse formatted code, thus use nightly formatter.
This commit is contained in:
parent
7006c7ceca
commit
7b0c7b6cb2
154 changed files with 3439 additions and 5891 deletions
|
|
@ -14,15 +14,13 @@ pub(crate) struct Lazy<T> {
|
|||
|
||||
impl<T> Lazy<T> {
|
||||
pub const fn new(f: fn() -> T) -> Self {
|
||||
Self {
|
||||
cell: OnceLock::new(),
|
||||
init: f,
|
||||
}
|
||||
Self { cell: OnceLock::new(), init: f }
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> Deref for Lazy<T> {
|
||||
type Target = T;
|
||||
|
||||
#[inline]
|
||||
fn deref(&self) -> &'_ T {
|
||||
self.cell.get_or_init(self.init)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue