Skip to content

Commit

Permalink
formatting... and a bit of docs
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertasJ committed Oct 20, 2024
1 parent 32bc349 commit d288144
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
12 changes: 10 additions & 2 deletions crates/torin/src/values/size.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
use std::{ops::Deref, slice::Iter};
use std::{
ops::Deref,
slice::Iter,
};

pub use euclid::Rect;

use crate::{geometry::Length, measure::Phase, scaled::Scaled};
use crate::{
geometry::Length,
measure::Phase,
scaled::Scaled,
};

#[derive(PartialEq, Clone, Debug)]
pub enum Size {
Expand Down Expand Up @@ -322,6 +329,7 @@ impl<'a> DynamicCalculationEvaluator<'a> {
}
}

/// parses out the prefix, like a + or -
fn parse_prefix(&mut self) -> Option<Option<DynamicCalculation>> {
match self.current? {
DynamicCalculation::Add => {
Expand Down
5 changes: 4 additions & 1 deletion crates/torin/tests/size.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
use euclid::Length;
use torin::{prelude::*, test_utils::*};
use torin::{
prelude::*,
test_utils::*,
};

#[test]
pub fn unsized_parent_with_child_with_margin() {
Expand Down

0 comments on commit d288144

Please sign in to comment.