resolve all lints, update MSRV
This commit is contained in:
parent
166b59f560
commit
f05a69a9d9
18 changed files with 251 additions and 283 deletions
|
|
@ -140,7 +140,7 @@ impl<'a> FontFallbackIter<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> Iterator for FontFallbackIter<'a> {
|
||||
impl Iterator for FontFallbackIter<'_> {
|
||||
type Item = Arc<Font>;
|
||||
fn next(&mut self) -> Option<Self::Item> {
|
||||
if let Some(fallback_info) = self.font_system.monospace_fallbacks_buffer.pop_first() {
|
||||
|
|
|
|||
|
|
@ -185,11 +185,11 @@ mod test {
|
|||
let now = std::time::Instant::now();
|
||||
|
||||
let mut db = fontdb::Database::new();
|
||||
let locale = get_locale().unwrap();
|
||||
let locale = get_locale().expect("Local available");
|
||||
db.load_system_fonts();
|
||||
FontSystem::new_with_locale_and_db(locale, db);
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
println!("Fonts load time {}ms.", now.elapsed().as_millis())
|
||||
println!("Fonts load time {}ms.", now.elapsed().as_millis());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ pub struct FontSystem {
|
|||
/// Scratch buffer for shaping and laying out.
|
||||
pub(crate) shape_buffer: ShapeBuffer,
|
||||
|
||||
/// Buffer for use in FontFallbackIter.
|
||||
/// Buffer for use in `FontFallbackIter`.
|
||||
pub(crate) monospace_fallbacks_buffer: BTreeSet<MonospaceFallbackInfo>,
|
||||
|
||||
/// Cache for shaped runs
|
||||
|
|
@ -372,7 +372,7 @@ pub struct BorrowedWithFontSystem<'a, T> {
|
|||
pub(crate) font_system: &'a mut FontSystem,
|
||||
}
|
||||
|
||||
impl<'a, T> Deref for BorrowedWithFontSystem<'a, T> {
|
||||
impl<T> Deref for BorrowedWithFontSystem<'_, T> {
|
||||
type Target = T;
|
||||
|
||||
fn deref(&self) -> &Self::Target {
|
||||
|
|
@ -380,7 +380,7 @@ impl<'a, T> Deref for BorrowedWithFontSystem<'a, T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a, T> DerefMut for BorrowedWithFontSystem<'a, T> {
|
||||
impl<T> DerefMut for BorrowedWithFontSystem<'_, T> {
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
self.inner
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue