-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apply rustfmt to entire project #847
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ | |
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
use std::collections::{HashMap, VecDeque}; | ||
#[cfg(not(target_arch = "wasm32"))] | ||
use std::time::Instant; | ||
|
||
use accesskit::{ActionRequest, TreeUpdate}; | ||
use parley::fontique::{self, Collection, CollectionOptions}; | ||
|
@@ -10,12 +12,9 @@ use tracing::{info_span, warn}; | |
use tree_arena::{ArenaMut, TreeArena}; | ||
use vello::kurbo::{self, Rect}; | ||
use vello::Scene; | ||
use winit::window::ResizeDirection; | ||
|
||
#[cfg(not(target_arch = "wasm32"))] | ||
use std::time::Instant; | ||
#[cfg(target_arch = "wasm32")] | ||
use web_time::Instant; | ||
Comment on lines
-15
to
16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Having the two versions of Instant imported as a single paragraph was nice, it's annoying that rustfmt splits it up. I'll admit this one is pretty minor, though. |
||
use winit::window::ResizeDirection; | ||
|
||
use crate::dpi::{LogicalPosition, LogicalSize, PhysicalSize}; | ||
use crate::event::{PointerEvent, TextEvent, WindowEvent}; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,6 @@ mod variable_label; | |
mod widget_arena; | ||
mod zstack; | ||
|
||
pub use self::image::Image; | ||
pub use align::Align; | ||
pub use button::Button; | ||
pub use checkbox::Checkbox; | ||
|
@@ -55,15 +54,15 @@ pub use split::Split; | |
pub use text_area::TextArea; | ||
pub use textbox::Textbox; | ||
pub use variable_label::VariableLabel; | ||
pub(crate) use widget_arena::WidgetArena; | ||
pub use widget_mut::WidgetMut; | ||
pub(crate) use widget_pod::CreateWidget; | ||
pub use widget_pod::WidgetPod; | ||
pub use widget_ref::WidgetRef; | ||
Comment on lines
55
to
61
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This paragraph mixes |
||
pub use zstack::{Alignment, ChildAlignment, HorizontalAlignment, VerticalAlignment, ZStack}; | ||
|
||
pub(crate) use widget_arena::WidgetArena; | ||
pub(crate) use widget_pod::CreateWidget; | ||
pub(crate) use widget_state::WidgetState; | ||
pub use zstack::{Alignment, ChildAlignment, HorizontalAlignment, VerticalAlignment, ZStack}; | ||
|
||
pub use self::image::Image; | ||
use crate::{Affine, Size}; | ||
Comment on lines
+65
to
66
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The re-export of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could probably address that by factoring |
||
|
||
// These are based on https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -141,23 +141,22 @@ use std::collections::HashMap; | |
use std::sync::Arc; | ||
|
||
use masonry::dpi::LogicalSize; | ||
pub use masonry::event_loop_runner::{EventLoop, EventLoopBuilder}; | ||
pub use masonry::widget::LineBreaking; | ||
use masonry::widget::{RootWidget, WidgetMut}; | ||
pub use masonry::{dpi, palette, Affine, Color, FontWeight, TextAlignment, Vec2}; | ||
use masonry::{event_loop_runner, FromDynWidget, Widget, WidgetId, WidgetPod}; | ||
/// Tokio is the async runner used with Xilem. | ||
pub use tokio; | ||
use view::{transformed, Transformed}; | ||
use winit::error::EventLoopError; | ||
use winit::window::{Window, WindowAttributes}; | ||
pub use xilem_core as core; | ||
Comment on lines
143
to
+154
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
use crate::core::{ | ||
AsyncCtx, MessageResult, Mut, RawProxy, SuperElement, View, ViewElement, ViewId, | ||
ViewPathTracker, ViewSequence, | ||
}; | ||
pub use masonry::event_loop_runner::{EventLoop, EventLoopBuilder}; | ||
pub use masonry::widget::LineBreaking; | ||
pub use masonry::{dpi, palette, Affine, Color, FontWeight, TextAlignment, Vec2}; | ||
pub use xilem_core as core; | ||
|
||
/// Tokio is the async runner used with Xilem. | ||
pub use tokio; | ||
|
||
mod any_view; | ||
mod driver; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This paragraph mixes exports of local symbols and re-exports of other crates' symbols.