mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-07-07 15:55:00 +00:00
Reduce development environment warnings and remove DWARF debug symbols (#2741)
* Ignore tauri gen * Deny warnings on CI * Fix all warnings in current nightly rustc * Disable DWARF debug info for development builds * Fix typo --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
parent
8e5abf65cb
commit
4344f28909
22 changed files with 53 additions and 7968 deletions
|
@ -54,7 +54,7 @@ impl<T> Instances<T> {
|
|||
})
|
||||
}
|
||||
|
||||
pub fn instance_ref_iter(&self) -> impl DoubleEndedIterator<Item = InstanceRef<T>> + Clone {
|
||||
pub fn instance_ref_iter(&self) -> impl DoubleEndedIterator<Item = InstanceRef<'_, T>> + Clone {
|
||||
self.instance
|
||||
.iter()
|
||||
.zip(self.transform.iter())
|
||||
|
@ -68,7 +68,7 @@ impl<T> Instances<T> {
|
|||
})
|
||||
}
|
||||
|
||||
pub fn instance_mut_iter(&mut self) -> impl DoubleEndedIterator<Item = InstanceMut<T>> {
|
||||
pub fn instance_mut_iter(&mut self) -> impl DoubleEndedIterator<Item = InstanceMut<'_, T>> {
|
||||
self.instance
|
||||
.iter_mut()
|
||||
.zip(self.transform.iter_mut())
|
||||
|
@ -82,7 +82,7 @@ impl<T> Instances<T> {
|
|||
})
|
||||
}
|
||||
|
||||
pub fn get(&self, index: usize) -> Option<InstanceRef<T>> {
|
||||
pub fn get(&self, index: usize) -> Option<InstanceRef<'_, T>> {
|
||||
if index >= self.instance.len() {
|
||||
return None;
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ impl<T> Instances<T> {
|
|||
})
|
||||
}
|
||||
|
||||
pub fn get_mut(&mut self, index: usize) -> Option<InstanceMut<T>> {
|
||||
pub fn get_mut(&mut self, index: usize) -> Option<InstanceMut<'_, T>> {
|
||||
if index >= self.instance.len() {
|
||||
return None;
|
||||
}
|
||||
|
@ -207,7 +207,7 @@ impl<T> Instance<T> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn to_instance_ref(&self) -> InstanceRef<T> {
|
||||
pub fn to_instance_ref(&self) -> InstanceRef<'_, T> {
|
||||
InstanceRef {
|
||||
instance: &self.instance,
|
||||
transform: &self.transform,
|
||||
|
@ -216,7 +216,7 @@ impl<T> Instance<T> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn to_instance_mut(&mut self) -> InstanceMut<T> {
|
||||
pub fn to_instance_mut(&mut self) -> InstanceMut<'_, T> {
|
||||
InstanceMut {
|
||||
instance: &mut self.instance,
|
||||
transform: &mut self.transform,
|
||||
|
|
|
@ -182,7 +182,7 @@ impl<T: Hash> MemoHash<T> {
|
|||
hasher.finish()
|
||||
}
|
||||
|
||||
pub fn inner_mut(&mut self) -> MemoHashGuard<T> {
|
||||
pub fn inner_mut(&mut self) -> MemoHashGuard<'_, T> {
|
||||
MemoHashGuard { inner: self }
|
||||
}
|
||||
pub fn into_inner(self) -> T {
|
||||
|
|
|
@ -208,7 +208,7 @@ pub fn bounding_box(str: &str, buzz_face: Option<&rustybuzz::Face>, typesetting:
|
|||
bounds
|
||||
}
|
||||
|
||||
pub fn load_face(data: &[u8]) -> rustybuzz::Face {
|
||||
pub fn load_face(data: &[u8]) -> rustybuzz::Face<'_> {
|
||||
rustybuzz::Face::from_slice(data, 0).expect("Loading font failed")
|
||||
}
|
||||
|
||||
|
|
|
@ -846,7 +846,7 @@ impl VectorData {
|
|||
})
|
||||
}
|
||||
|
||||
pub fn build_stroke_path_iter(&self) -> StrokePathIter {
|
||||
pub fn build_stroke_path_iter(&self) -> StrokePathIter<'_> {
|
||||
let mut points = vec![StrokePathIterPointMetadata::default(); self.point_domain.ids().len()];
|
||||
for (segment_index, (&start, &end)) in self.segment_domain.start_point.iter().zip(&self.segment_domain.end_point).enumerate() {
|
||||
points[start].set(StrokePathIterPointSegmentMetadata::new(segment_index, false));
|
||||
|
|
|
@ -25,11 +25,11 @@ use std::hash::{Hash, Hasher};
|
|||
/// Implemented for types that can be converted to an iterator of vector data.
|
||||
/// Used for the fill and stroke node so they can be used on VectorData or GraphicGroup
|
||||
trait VectorDataTableIterMut {
|
||||
fn vector_iter_mut(&mut self) -> impl Iterator<Item = InstanceMut<VectorData>>;
|
||||
fn vector_iter_mut(&mut self) -> impl Iterator<Item = InstanceMut<'_, VectorData>>;
|
||||
}
|
||||
|
||||
impl VectorDataTableIterMut for GraphicGroupTable {
|
||||
fn vector_iter_mut(&mut self) -> impl Iterator<Item = InstanceMut<VectorData>> {
|
||||
fn vector_iter_mut(&mut self) -> impl Iterator<Item = InstanceMut<'_, VectorData>> {
|
||||
// Grab only the direct children
|
||||
self.instance_mut_iter()
|
||||
.filter_map(|element| element.instance.as_vector_data_mut())
|
||||
|
@ -38,7 +38,7 @@ impl VectorDataTableIterMut for GraphicGroupTable {
|
|||
}
|
||||
|
||||
impl VectorDataTableIterMut for VectorDataTable {
|
||||
fn vector_iter_mut(&mut self) -> impl Iterator<Item = InstanceMut<VectorData>> {
|
||||
fn vector_iter_mut(&mut self) -> impl Iterator<Item = InstanceMut<'_, VectorData>> {
|
||||
self.instance_mut_iter()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -389,7 +389,7 @@ impl NodeInput {
|
|||
pub fn as_value(&self) -> Option<&TaggedValue> {
|
||||
if let NodeInput::Value { tagged_value, .. } = self { Some(tagged_value) } else { None }
|
||||
}
|
||||
pub fn as_value_mut(&mut self) -> Option<MemoHashGuard<TaggedValue>> {
|
||||
pub fn as_value_mut(&mut self) -> Option<MemoHashGuard<'_, TaggedValue>> {
|
||||
if let NodeInput::Value { tagged_value, .. } = self { Some(tagged_value.inner_mut()) } else { None }
|
||||
}
|
||||
pub fn as_non_exposed_value(&self) -> Option<&TaggedValue> {
|
||||
|
@ -1245,7 +1245,7 @@ impl NodeNetwork {
|
|||
}
|
||||
|
||||
/// Create a [`RecursiveNodeIter`] that iterates over all [`DocumentNode`]s, including ones that are deeply nested.
|
||||
pub fn recursive_nodes(&self) -> RecursiveNodeIter {
|
||||
pub fn recursive_nodes(&self) -> RecursiveNodeIter<'_> {
|
||||
let nodes = self.nodes.iter().collect();
|
||||
RecursiveNodeIter { nodes }
|
||||
}
|
||||
|
|
|
@ -32,5 +32,5 @@ impl Compiler {
|
|||
}
|
||||
|
||||
pub trait Executor<I, O> {
|
||||
fn execute(&self, input: I) -> LocalFuture<Result<O, Box<dyn Error>>>;
|
||||
fn execute(&self, input: I) -> LocalFuture<'_, Result<O, Box<dyn Error>>>;
|
||||
}
|
||||
|
|
|
@ -120,7 +120,7 @@ impl<I> Executor<I, TaggedValue> for &DynamicExecutor
|
|||
where
|
||||
I: StaticType + 'static + Send + Sync + std::panic::UnwindSafe,
|
||||
{
|
||||
fn execute(&self, input: I) -> LocalFuture<Result<TaggedValue, Box<dyn Error>>> {
|
||||
fn execute(&self, input: I) -> LocalFuture<'_, Result<TaggedValue, Box<dyn Error>>> {
|
||||
Box::pin(async move {
|
||||
use futures::FutureExt;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue