Skip to content

Commit

Permalink
refactor: delete data protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
technobaboo committed Dec 12, 2024
1 parent 78d8baf commit 3d96dfd
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 308 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions codegen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ pub fn codegen_field_protocol(_input: proc_macro::TokenStream) -> proc_macro::To
codegen_protocol(FIELD_PROTOCOL)
}
#[proc_macro]
pub fn codegen_data_protocol(_input: proc_macro::TokenStream) -> proc_macro::TokenStream {
codegen_protocol(DATA_PROTOCOL)
}
#[proc_macro]
pub fn codegen_audio_protocol(_input: proc_macro::TokenStream) -> proc_macro::TokenStream {
codegen_protocol(AUDIO_PROTOCOL)
}
Expand Down Expand Up @@ -578,6 +574,7 @@ fn argument_type_option_name(argument_type: &ArgumentType) -> String {
ArgumentType::Union(u) => u.clone(),
ArgumentType::Struct(s) => s.clone(),
ArgumentType::Node { _type, .. } => _type.clone(),
ArgumentType::Fd => "File Descriptor".to_string(),
}
}
fn generate_argument_type(
Expand Down Expand Up @@ -674,6 +671,9 @@ fn generate_argument_type(
quote!(std::sync::Arc<crate::nodes::Node>)
}
}
ArgumentType::Fd => {
quote!(&std::os::fd::OwnedFd)
}
};

if optional {
Expand Down
3 changes: 1 addition & 2 deletions src/core/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use super::{
use crate::{
core::{registry::OwnedRegistry, task},
nodes::{
audio, data, drawable, fields, input, items,
audio, drawable, fields, input, items,
root::{ClientState, Root},
spatial, Node,
},
Expand Down Expand Up @@ -112,7 +112,6 @@ impl Client {
fields::create_interface(&client)?;
drawable::create_interface(&client)?;
audio::create_interface(&client)?;
data::create_interface(&client)?;
input::create_interface(&client)?;
items::camera::create_interface(&client)?;
items::panel::create_interface(&client)?;
Expand Down
271 changes: 0 additions & 271 deletions src/nodes/data.rs

This file was deleted.

Loading

0 comments on commit 3d96dfd

Please sign in to comment.