mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-19 10:58:04 +08:00
Upgrade to the Rust 2024 edition (#2367)
* Update to rust 2024 edition * Fixes * Clean up imports * Cargo fmt again --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
use crate::transform::Footprint;
|
||||
|
||||
use core::{any::Any, borrow::Borrow, panic::Location};
|
||||
use core::any::Any;
|
||||
use core::borrow::Borrow;
|
||||
use core::panic::Location;
|
||||
use std::sync::Arc;
|
||||
|
||||
pub trait Ctx: Clone + Send {}
|
||||
@@ -87,12 +88,12 @@ impl<T: ExtractIndex> ExtractIndex for Option<T> {
|
||||
}
|
||||
impl<T: ExtractVarArgs + Sync> ExtractVarArgs for Option<T> {
|
||||
fn vararg(&self, index: usize) -> Result<DynRef<'_>, VarArgsResult> {
|
||||
let Some(ref inner) = self else { return Err(VarArgsResult::NoVarArgs) };
|
||||
let Some(inner) = self else { return Err(VarArgsResult::NoVarArgs) };
|
||||
inner.vararg(index)
|
||||
}
|
||||
|
||||
fn varargs_len(&self) -> Result<usize, VarArgsResult> {
|
||||
let Some(ref inner) = self else { return Err(VarArgsResult::NoVarArgs) };
|
||||
let Some(inner) = self else { return Err(VarArgsResult::NoVarArgs) };
|
||||
inner.varargs_len()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user