Debug for Image {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let length = self.data.len();
f.debug_struct("Image")
.field("width", &self.width)
@@ -203,7 +200,7 @@ where
impl IntoIterator for Image {
type Item = P;
- type IntoIter = alloc::vec::IntoIter
;
+ type IntoIter = std::vec::IntoIter
;
fn into_iter(self) -> Self::IntoIter {
self.data.into_iter()
}
diff --git a/node-graph/gcore/src/registry.rs b/node-graph/gcore/src/registry.rs
index 9a773cb51a..4a7cbdbff0 100644
--- a/node-graph/gcore/src/registry.rs
+++ b/node-graph/gcore/src/registry.rs
@@ -108,10 +108,10 @@ pub static NODE_REGISTRY: NodeRegistry = LazyLock::new(|| Mutex::new(HashMap::ne
pub static NODE_METADATA: LazyLock>> = LazyLock::new(|| Mutex::new(HashMap::new()));
#[cfg(not(target_arch = "wasm32"))]
-pub type DynFuture<'n, T> = Pin + 'n + Send>>;
+pub type DynFuture<'n, T> = Pin + 'n + Send>>;
#[cfg(target_arch = "wasm32")]
-pub type DynFuture<'n, T> = Pin + 'n>>;
-pub type LocalFuture<'n, T> = Pin + 'n>>;
+pub type DynFuture<'n, T> = Pin + 'n>>;
+pub type LocalFuture<'n, T> = Pin + 'n>>;
#[cfg(not(target_arch = "wasm32"))]
pub type Any<'n> = Box + 'n + Send>;
#[cfg(target_arch = "wasm32")]
@@ -169,8 +169,8 @@ impl Drop for NodeContainer {
}
}
-impl core::fmt::Debug for NodeContainer {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> std::fmt::Result {
+impl std::fmt::Debug for NodeContainer {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("NodeContainer").finish()
}
}
@@ -184,7 +184,7 @@ impl NodeContainer {
#[cfg(feature = "dealloc_nodes")]
unsafe fn dealloc_unchecked(&mut self) {
unsafe {
- std::mem::drop(Box::from_raw(self.node as *mut TypeErasedNode));
+ drop(Box::from_raw(self.node as *mut TypeErasedNode));
}
}
}
@@ -219,7 +219,7 @@ where
self.node.reset();
}
- fn serialize(&self) -> Option> {
+ fn serialize(&self) -> Option> {
self.node.serialize()
}
}
@@ -227,8 +227,8 @@ impl DowncastBothNode {
pub const fn new(node: SharedNodeContainer) -> Self {
Self {
node,
- _i: core::marker::PhantomData,
- _o: core::marker::PhantomData,
+ _i: PhantomData,
+ _o: PhantomData,
}
}
}
@@ -252,7 +252,7 @@ where
}
#[inline(always)]
- fn serialize(&self) -> Option> {
+ fn serialize(&self) -> Option> {
self.node.serialize()
}
}
@@ -271,14 +271,14 @@ pub struct DynAnyNode {
impl<'input, I, O, N> Node<'input, Any<'input>> for DynAnyNode
where
- I: 'input + dyn_any::StaticType + WasmNotSend,
- O: 'input + dyn_any::StaticType + WasmNotSend,
+ I: 'input + StaticType + WasmNotSend,
+ O: 'input + StaticType + WasmNotSend,
N: 'input + Node<'input, I, Output = DynFuture<'input, O>>,
{
type Output = FutureAny<'input>;
#[inline]
fn eval(&'input self, input: Any<'input>) -> Self::Output {
- let node_name = core::any::type_name::();
+ let node_name = std::any::type_name::();
let output = |input| {
let result = self.node.eval(input);
async move { Box::new(result.await) as Any<'input> }
@@ -293,21 +293,21 @@ where
self.node.reset();
}
- fn serialize(&self) -> Option> {
+ fn serialize(&self) -> Option> {
self.node.serialize()
}
}
impl<'input, I, O, N> DynAnyNode
where
- I: 'input + dyn_any::StaticType,
- O: 'input + dyn_any::StaticType,
+ I: 'input + StaticType,
+ O: 'input + StaticType,
N: 'input + Node<'input, I, Output = DynFuture<'input, O>>,
{
pub const fn new(node: N) -> Self {
Self {
node,
- _i: core::marker::PhantomData,
- _o: core::marker::PhantomData,
+ _i: PhantomData,
+ _o: PhantomData,
}
}
}
diff --git a/node-graph/gcore/src/structural.rs b/node-graph/gcore/src/structural.rs
index 875315a620..b6488c573c 100644
--- a/node-graph/gcore/src/structural.rs
+++ b/node-graph/gcore/src/structural.rs
@@ -1,5 +1,5 @@
use crate::Node;
-use core::marker::PhantomData;
+use std::marker::PhantomData;
/// This is how we can generically define composition of two nodes.
/// This is done generically as shown:
@@ -58,10 +58,10 @@ pub struct AsyncComposeNode {
impl<'i, Input: 'static, First, Second> Node<'i, Input> for AsyncComposeNode
where
First: Node<'i, Input>,
- First::Output: core::future::Future,
- Second: Node<'i, <>::Output as core::future::Future>::Output> + 'i,
+ First::Output: Future,
+ Second: Node<'i, <>::Output as Future>::Output> + 'i,
{
- type Output = core::pin::Pin>::Output as core::future::Future>::Output>>::Output> + 'i>>;
+ type Output = std::pin::Pin>::Output as Future>::Output>>::Output> + 'i>>;
fn eval(&'i self, input: Input) -> Self::Output {
Box::pin(async move {
let arg = self.first.eval(input).await;
@@ -73,8 +73,8 @@ where
impl<'i, First, Second, Input: 'i> AsyncComposeNode
where
First: Node<'i, Input>,
- First::Output: core::future::Future,
- Second: Node<'i, <>::Output as core::future::Future>::Output> + 'i,
+ First::Output: Future,
+ Second: Node<'i, <>::Output as Future>::Output> + 'i,
{
pub const fn new(first: First, second: Second) -> Self {
AsyncComposeNode:: { first, second, phantom: PhantomData }
@@ -97,8 +97,8 @@ pub trait AndThen<'i, Input: 'i>: Sized {
fn and_then(self, second: Second) -> AsyncComposeNode
where
Self: Node<'i, Input>,
- Self::Output: core::future::Future,
- Second: Node<'i, <>::Output as core::future::Future>::Output> + 'i,
+ Self::Output: Future,
+ Second: Node<'i, <>::Output as Future>::Output> + 'i,
{
AsyncComposeNode::new(self, second)
}
diff --git a/node-graph/gcore/src/text/font_cache.rs b/node-graph/gcore/src/text/font_cache.rs
index de7581a8c9..a872166fb3 100644
--- a/node-graph/gcore/src/text/font_cache.rs
+++ b/node-graph/gcore/src/text/font_cache.rs
@@ -61,8 +61,8 @@ impl FontCache {
}
}
-impl core::hash::Hash for FontCache {
- fn hash(&self, state: &mut H) {
+impl std::hash::Hash for FontCache {
+ fn hash(&self, state: &mut H) {
self.preview_urls.len().hash(state);
self.preview_urls.iter().for_each(|(font, url)| {
font.hash(state);
diff --git a/node-graph/gcore/src/transform.rs b/node-graph/gcore/src/transform.rs
index 72fcf795c7..ce21a10ca0 100644
--- a/node-graph/gcore/src/transform.rs
+++ b/node-graph/gcore/src/transform.rs
@@ -136,8 +136,8 @@ impl From<()> for Footprint {
}
}
-impl core::hash::Hash for Footprint {
- fn hash(&self, state: &mut H) {
+impl std::hash::Hash for Footprint {
+ fn hash(&self, state: &mut H) {
self.transform.to_cols_array().iter().for_each(|x| x.to_le_bytes().hash(state));
self.resolution.hash(state)
}
diff --git a/node-graph/gcore/src/types.rs b/node-graph/gcore/src/types.rs
index 8bad9514c3..b7dd4c7e6b 100644
--- a/node-graph/gcore/src/types.rs
+++ b/node-graph/gcore/src/types.rs
@@ -1,4 +1,4 @@
-use core::any::TypeId;
+use std::any::TypeId;
pub use std::borrow::Cow;
@@ -6,20 +6,20 @@ pub use std::borrow::Cow;
macro_rules! concrete {
($type:ty) => {
$crate::Type::Concrete($crate::TypeDescriptor {
- id: Some(core::any::TypeId::of::<$type>()),
- name: $crate::Cow::Borrowed(core::any::type_name::<$type>()),
+ id: Some(std::any::TypeId::of::<$type>()),
+ name: $crate::Cow::Borrowed(std::any::type_name::<$type>()),
alias: None,
- size: core::mem::size_of::<$type>(),
- align: core::mem::align_of::<$type>(),
+ size: std::mem::size_of::<$type>(),
+ align: std::mem::align_of::<$type>(),
})
};
($type:ty, $name:ty) => {
$crate::Type::Concrete($crate::TypeDescriptor {
- id: Some(core::any::TypeId::of::<$type>()),
- name: $crate::Cow::Borrowed(core::any::type_name::<$type>()),
+ id: Some(std::any::TypeId::of::<$type>()),
+ name: $crate::Cow::Borrowed(std::any::type_name::<$type>()),
alias: Some($crate::Cow::Borrowed(stringify!($name))),
- size: core::mem::size_of::<$type>(),
- align: core::mem::align_of::<$type>(),
+ size: std::mem::size_of::<$type>(),
+ align: std::mem::align_of::<$type>(),
})
};
}
@@ -28,11 +28,11 @@ macro_rules! concrete {
macro_rules! concrete_with_name {
($type:ty, $name:expr_2021) => {
$crate::Type::Concrete($crate::TypeDescriptor {
- id: Some(core::any::TypeId::of::<$type>()),
+ id: Some(std::any::TypeId::of::<$type>()),
name: $crate::Cow::Borrowed($name),
alias: None,
- size: core::mem::size_of::<$type>(),
- align: core::mem::align_of::<$type>(),
+ size: std::mem::size_of::<$type>(),
+ align: std::mem::align_of::<$type>(),
})
};
}
@@ -114,8 +114,8 @@ impl NodeIOTypes {
}
}
-impl core::fmt::Debug for NodeIOTypes {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+impl std::fmt::Debug for NodeIOTypes {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_fmt(format_args!(
"node({}) → {}",
[&self.call_argument].into_iter().chain(&self.inputs).map(|input| input.to_string()).collect::>().join(", "),
@@ -141,7 +141,7 @@ fn migrate_type_descriptor_names<'de, D: serde::Deserializer<'de>>(deserializer:
let name = String::deserialize(deserializer)?;
let name = match name.as_str() {
"f32" => "f64".to_string(),
- "graphene_core::transform::Footprint" => "core::option::Option>".to_string(),
+ "graphene_core::transform::Footprint" => "std::option::Option>".to_string(),
"graphene_core::graphic_element::GraphicGroup" => "graphene_core::instances::Instances".to_string(),
"graphene_core::vector::vector_data::VectorData" => "graphene_core::instances::Instances".to_string(),
"graphene_core::raster::image::ImageFrame"
@@ -172,8 +172,8 @@ pub struct TypeDescriptor {
pub align: usize,
}
-impl core::hash::Hash for TypeDescriptor {
- fn hash(&self, state: &mut H) {
+impl std::hash::Hash for TypeDescriptor {
+ fn hash(&self, state: &mut H) {
self.name.hash(state);
}
}
@@ -264,10 +264,10 @@ impl Type {
pub fn new() -> Self {
Self::Concrete(TypeDescriptor {
id: Some(TypeId::of::()),
- name: Cow::Borrowed(core::any::type_name::()),
+ name: Cow::Borrowed(std::any::type_name::()),
alias: None,
- size: core::mem::size_of::(),
- align: core::mem::align_of::(),
+ size: size_of::(),
+ align: align_of::(),
})
}
@@ -318,8 +318,8 @@ fn format_type(ty: &str) -> String {
.join("<")
}
-impl core::fmt::Debug for Type {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+impl std::fmt::Debug for Type {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let result = match self {
Self::Generic(name) => name.to_string(),
#[cfg(feature = "type_id_logging")]
diff --git a/node-graph/gcore/src/uuid.rs b/node-graph/gcore/src/uuid.rs
index 420f2388d9..3df5007e08 100644
--- a/node-graph/gcore/src/uuid.rs
+++ b/node-graph/gcore/src/uuid.rs
@@ -43,9 +43,9 @@ mod u64_string {
}
mod uuid_generation {
- use core::cell::Cell;
use rand_chacha::ChaCha20Rng;
use rand_chacha::rand_core::{RngCore, SeedableRng};
+ use std::cell::Cell;
use std::sync::Mutex;
static RNG: Mutex