Reformat with the 2024 rustfmt style edition
This commit is contained in:
parent
debd3795e9
commit
dfc22b0008
19 changed files with 32 additions and 33 deletions
|
|
@ -2,7 +2,7 @@ use image::RgbaImage;
|
|||
use palette::Srgba;
|
||||
use taffy::{AvailableSpace, NodeId, Point, Size, TaffyResult, TaffyTree};
|
||||
|
||||
use crate::{color, BoxedWidget, Rect, Vec2, View};
|
||||
use crate::{BoxedWidget, Rect, Vec2, View, color};
|
||||
|
||||
fn point_to_vec2(point: Point<f32>) -> Vec2 {
|
||||
Vec2::new(point.x as i32, point.y as i32)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use image::RgbaImage;
|
||||
use palette::{blend::Compose, Srgba};
|
||||
use palette::{Srgba, blend::Compose};
|
||||
|
||||
use crate::{color, Rect, Vec2};
|
||||
use crate::{Rect, Vec2, color};
|
||||
|
||||
pub struct View<'a> {
|
||||
area: Rect,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use palette::Srgba;
|
||||
use taffy::Layout;
|
||||
|
||||
use crate::{color, Rect, Vec2, View, Widget};
|
||||
use crate::{Rect, Vec2, View, Widget, color};
|
||||
|
||||
pub struct Block {
|
||||
border: Srgba,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use image::{
|
||||
imageops::{self, FilterType},
|
||||
RgbaImage,
|
||||
imageops::{self, FilterType},
|
||||
};
|
||||
use mark::dither::{AlgoFloydSteinberg, AlgoStucki, Algorithm, DiffEuclid, Palette};
|
||||
use palette::{IntoColor, LinSrgb, Srgba};
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@ use cosmic_text::{Attrs, AttrsOwned, Buffer, Family, FontSystem, Metrics, Shapin
|
|||
use palette::Srgba;
|
||||
use showbits_assets::{UNIFONT, UNIFONT_JP, UNIFONT_NAME, UNIFONT_SIZE, UNIFONT_UPPER};
|
||||
use taffy::{
|
||||
prelude::{AvailableSpace, Size},
|
||||
Layout,
|
||||
prelude::{AvailableSpace, Size},
|
||||
};
|
||||
|
||||
use crate::{color, Rect, Vec2, View, Widget};
|
||||
use crate::{Rect, Vec2, View, Widget, color};
|
||||
|
||||
// https://github.com/DioxusLabs/taffy/blob/main/examples/cosmic_text.rs
|
||||
|
||||
|
|
|
|||
|
|
@ -4,10 +4,11 @@ use anyhow::anyhow;
|
|||
use comemo::Prehashed;
|
||||
use image::RgbaImage;
|
||||
use taffy::{
|
||||
prelude::{AvailableSpace, Size},
|
||||
Layout,
|
||||
prelude::{AvailableSpace, Size},
|
||||
};
|
||||
use typst::{
|
||||
Library, World,
|
||||
diag::{FileError, FileResult},
|
||||
eval::Tracer,
|
||||
foundations::{Bytes, Datetime},
|
||||
|
|
@ -15,7 +16,6 @@ use typst::{
|
|||
syntax::{FileId, Source},
|
||||
text::{Font, FontBook},
|
||||
visualize::Color,
|
||||
Library, World,
|
||||
};
|
||||
|
||||
use crate::{View, Widget};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue