Skip to content

Commit

Permalink
Improve docs in ScriptInstance
Browse files Browse the repository at this point in the history
Also rename {get|set} to {get|set}_property, consistent with IObject virtual methods.
  • Loading branch information
Bromeon committed Feb 22, 2024
1 parent 300abf2 commit 2fc4953
Show file tree
Hide file tree
Showing 3 changed files with 154 additions and 76 deletions.
4 changes: 2 additions & 2 deletions godot-codegen/src/generator/docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ pub fn make_class_doc(

let notes = special_cases::get_class_extra_docs(class_name)
.map(|notes| format!("# Specific notes for this class\n\n{}", notes))
.unwrap_or(String::new());
.unwrap_or_default();

format!(
"Godot class `{godot_ty}.`\n\n\
Expand All @@ -77,7 +77,7 @@ pub fn make_virtual_trait_doc(trait_name_str: &str, class_name: &TyName) -> Stri

let notes = special_cases::get_interface_extra_docs(trait_name_str)
.map(|notes| format!("# Specific notes for this interface\n\n{}", notes))
.unwrap_or(String::new());
.unwrap_or_default();

format!(
"Virtual methods for class [`{rust_ty}`][crate::engine::{rust_ty}].\
Expand Down

0 comments on commit 2fc4953

Please sign in to comment.