Skip to content

Commit e17ce1d

Browse files
committed
Cleanup
1 parent af05acf commit e17ce1d

File tree

4 files changed

+2
-18
lines changed

4 files changed

+2
-18
lines changed

node-graph/gcore/src/registry.rs

-4
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,6 @@ pub static NODE_METADATA: LazyLock<Mutex<HashMap<String, NodeMetadata>>> = LazyL
7777
pub type DynFuture<'n, T> = Pin<Box<dyn core::future::Future<Output = T> + 'n + Send>>;
7878
#[cfg(target_arch = "wasm32")]
7979
pub type DynFuture<'n, T> = Pin<Box<dyn core::future::Future<Output = T> + 'n>>;
80-
#[cfg(not(target_arch = "wasm32"))]
81-
pub type SyncFuture<'n, T> = Pin<Box<dyn core::future::Future<Output = T> + 'n + Send + Sync>>;
82-
#[cfg(target_arch = "wasm32")]
83-
pub type SyncFuture<'n, T> = Pin<Box<dyn core::future::Future<Output = T> + 'n>>;
8480
pub type LocalFuture<'n, T> = Pin<Box<dyn core::future::Future<Output = T> + 'n>>;
8581
#[cfg(not(target_arch = "wasm32"))]
8682
pub type Any<'n> = Box<dyn DynAny<'n> + 'n + Send>;

node-graph/graph-craft/src/document.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -287,16 +287,10 @@ impl DocumentNode {
287287

288288
fn resolve_proto_node(mut self) -> ProtoNode {
289289
assert!(!self.inputs.is_empty() || self.manual_composition.is_some(), "Resolving document node {self:#?} with no inputs");
290-
let DocumentNodeImplementation::ProtoNode(fqn) = self.implementation else {
290+
let DocumentNodeImplementation::ProtoNode(identifier) = self.implementation else {
291291
unreachable!("tried to resolve not flattened node on resolved node {self:?}");
292292
};
293293

294-
let identifier = fqn;
295-
// TODO replace with proper generics removal
296-
// let identifier = match fqn.name.clone().split_once('<') {
297-
// Some((path, _generics)) => ProtoNodeIdentifier { name: Cow::Owned(path.to_string()) },
298-
// _ => ProtoNodeIdentifier { name: fqn.name },
299-
// };
300294
let (input, mut args) = if let Some(ty) = self.manual_composition {
301295
(ProtoNodeInput::ManualComposition(ty), ConstructionArgs::Nodes(vec![]))
302296
} else {

node-graph/graph-craft/src/proto.rs

-3
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,6 @@ impl TypingContext {
731731
.map(|generic| check_generic(node_io, &primary_input_or_call_argument, &inputs, generic).map(|x| (generic.to_string(), x)))
732732
.collect();
733733

734-
// TODO: Proper error handling
735734
generics_lookup.map(|generics_lookup| {
736735
let orig_node_io = (*node_io).clone();
737736
let mut new_node_io = orig_node_io.clone();
@@ -748,7 +747,6 @@ impl TypingContext {
748747
[] => {
749748
let mut best_errors = usize::MAX;
750749
let mut error_inputs = Vec::new();
751-
log::debug!("impls: {impls:?}");
752750
for node_io in impls.keys() {
753751
let current_errors = [&primary_input_or_call_argument]
754752
.into_iter()
@@ -850,7 +848,6 @@ fn check_generic(types: &NodeIOTypes, input: &Type, parameters: &[Type], generic
850848
if outputs.any(|ty| ty != out_ty) {
851849
return Err(format!("Generic output type {generic} is dependent on multiple inputs or parameters",));
852850
}
853-
log::debug!("concrete type: {}", out_ty);
854851
Ok(out_ty.clone())
855852
}
856853

node-graph/interpreted-executor/src/node_registry.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -329,14 +329,11 @@ fn node_registry() -> HashMap<ProtoNodeIdentifier, HashMap<NodeIOTypes, NodeCons
329329
// This occurs for the ChannelMixerNode presumably because of the long name.
330330
// This might be caused by the stringify! macro
331331
let mut new_name = id.name.replace('\n', " ");
332-
// Remove struct generics
333-
log::debug!("into node with path: {}", new_name);
332+
// Remove struct generics for all nodes except for the IntoNode
334333
if !new_name.contains("IntoNode") {
335334
if let Some((path, _generics)) = new_name.split_once("<") {
336335
new_name = path.to_string();
337336
}
338-
} else {
339-
log::debug!("into node with path: {}", new_name);
340337
}
341338
let nid = ProtoNodeIdentifier { name: Cow::Owned(new_name) };
342339
map.entry(nid).or_default().insert(types.clone(), c);

0 commit comments

Comments
 (0)