mirror of
https://github.com/typst/typst
synced 2025-07-27 14:27:56 +08:00
Compare commits
3 Commits
96745a7ed2
...
6c1789a433
Author | SHA1 | Date | |
---|---|---|---|
|
6c1789a433 | ||
|
e9f1b5825a | ||
|
ed5f85e0cd |
@ -159,6 +159,7 @@ strip = true
|
|||||||
[workspace.lints.clippy]
|
[workspace.lints.clippy]
|
||||||
blocks_in_conditions = "allow"
|
blocks_in_conditions = "allow"
|
||||||
comparison_chain = "allow"
|
comparison_chain = "allow"
|
||||||
|
iter_over_hash_type = "warn"
|
||||||
manual_range_contains = "allow"
|
manual_range_contains = "allow"
|
||||||
mutable_key_type = "allow"
|
mutable_key_type = "allow"
|
||||||
uninlined_format_args = "warn"
|
uninlined_format_args = "warn"
|
||||||
|
@ -139,6 +139,7 @@ impl Watcher {
|
|||||||
fn update(&mut self, iter: impl IntoIterator<Item = PathBuf>) -> StrResult<()> {
|
fn update(&mut self, iter: impl IntoIterator<Item = PathBuf>) -> StrResult<()> {
|
||||||
// Mark all files as not "seen" so that we may unwatch them if they
|
// Mark all files as not "seen" so that we may unwatch them if they
|
||||||
// aren't in the dependency list.
|
// aren't in the dependency list.
|
||||||
|
#[allow(clippy::iter_over_hash_type, reason = "order does not matter")]
|
||||||
for seen in self.watched.values_mut() {
|
for seen in self.watched.values_mut() {
|
||||||
*seen = false;
|
*seen = false;
|
||||||
}
|
}
|
||||||
|
@ -173,6 +173,7 @@ impl SystemWorld {
|
|||||||
|
|
||||||
/// Reset the compilation state in preparation of a new compilation.
|
/// Reset the compilation state in preparation of a new compilation.
|
||||||
pub fn reset(&mut self) {
|
pub fn reset(&mut self) {
|
||||||
|
#[allow(clippy::iter_over_hash_type, reason = "order does not matter")]
|
||||||
for slot in self.slots.get_mut().values_mut() {
|
for slot in self.slots.get_mut().values_mut() {
|
||||||
slot.reset();
|
slot.reset();
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@ struct State<'a> {
|
|||||||
size: Size,
|
size: Size,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl State<'_> {
|
impl<'a> State<'a> {
|
||||||
fn new(size: Size, transform: sk::Transform, pixel_per_pt: f32) -> Self {
|
fn new(size: Size, transform: sk::Transform, pixel_per_pt: f32) -> Self {
|
||||||
Self {
|
Self {
|
||||||
size,
|
size,
|
||||||
@ -128,9 +128,10 @@ impl State<'_> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Sets the current mask.
|
/// Sets the current mask.
|
||||||
fn with_mask(self, mask: Option<&sk::Mask>) -> State<'_> {
|
///
|
||||||
// Ensure that we're using the parent's mask if we don't have one.
|
/// If no mask is provided, the parent mask is used.
|
||||||
if mask.is_some() { State { mask, ..self } } else { State { mask: None, ..self } }
|
fn with_mask(self, mask: Option<&'a sk::Mask>) -> State<'a> {
|
||||||
|
State { mask: mask.or(self.mask), ..self }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Sets the size of the first hard frame in the hierarchy.
|
/// Sets the size of the first hard frame in the hierarchy.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user