Skip to content

Commit 9aed2bc

Browse files
committed
refactor: GenericRpcBuilder to RpcBuilder
1 parent 2783135 commit 9aed2bc

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

  • godot-core/src/obj
  • godot-macros/src/class/data_models

godot-core/src/obj/rpc.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ use crate::obj::{GodotClass, Inherits, WithBaseField};
1212

1313
/// Represents an RPC, and the object that it can be called on, and is usually obtained through the type-safe RPC API. See
1414
/// the [relevant section]() in the book for more information about type-safe RPC calls.
15-
pub struct GenericRpcBuilder<'c, C: GodotClass> {
15+
pub struct RpcBuilder<'c, C: GodotClass> {
1616
object: UserRpcObject<'c, C>,
1717
rpc_name: &'c str,
1818
parameters: Vec<Variant>,
1919
}
2020

21-
impl<'c, C: GodotClass> GenericRpcBuilder<'c, C> {
21+
impl<'c, C: GodotClass> RpcBuilder<'c, C> {
2222
pub fn new(object: UserRpcObject<'c, C>, rpc_name: &'c str, parameters: Vec<Variant>) -> Self {
2323
Self {
2424
object,
@@ -28,7 +28,7 @@ impl<'c, C: GodotClass> GenericRpcBuilder<'c, C> {
2828
}
2929
}
3030

31-
impl<'c, C> GenericRpcBuilder<'c, C>
31+
impl<'c, C> RpcBuilder<'c, C>
3232
where
3333
C: WithBaseField + Inherits<Node>,
3434
C::Base: Inherits<Node>,

godot-macros/src/class/data_models/rpc.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,8 @@ pub fn make_rpc_api(for_class: &Ident, rpcs: Vec<&FuncDefinition>) -> TokenStrea
192192

193193
collection_impl_methods.append_all(quote! {
194194
#[must_use]
195-
pub fn #rpc_name(self, #rpc_typed_args) -> GenericRpcBuilder<'c, #for_class> {
196-
GenericRpcBuilder::new(
195+
pub fn #rpc_name(self, #rpc_typed_args) -> RpcBuilder<'c, #for_class> {
196+
RpcBuilder::new(
197197
self.object,
198198
stringify!(#rpc_name),
199199
vec![#( #rpc_args.to_variant() ),*],
@@ -211,7 +211,7 @@ pub fn make_rpc_api(for_class: &Ident, rpcs: Vec<&FuncDefinition>) -> TokenStrea
211211
#![allow(non_camel_case_types)]
212212

213213
use super::*;
214-
use ::godot::obj::{RpcCollection, UserRpcObject, GenericRpcBuilder};
214+
use ::godot::obj::{RpcCollection, UserRpcObject, RpcBuilder};
215215

216216
#[doc(hidden)]
217217
pub struct #collection_name<'c>

0 commit comments

Comments
 (0)