Skip to content

Commit

Permalink
fix: update readme and add missing visibility modifier
Browse files Browse the repository at this point in the history
  • Loading branch information
mdevils committed Apr 4, 2024
1 parent d0ed0d0 commit 434c674
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
14 changes: 7 additions & 7 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "osakit"
version = "0.2.2"
version = "0.2.3"
edition = "2021"
authors = ["Marat Dulin <mdevils@gmail.com>"]
description = "OSAKit macOS Framework adapted for Rust"
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ declare_script! {
};
}
")]
MyJsScript {
fn concat(x: &str, y: &str) -> String;
fn multiply(a: i32, b: i32) -> i32;
fn current_user() -> User;
pub MyJsScript {
pub fn concat(x: &str, y: &str) -> String;
pub fn multiply(a: i32, b: i32) -> i32;
pub fn current_user() -> User;
}
}

Expand Down
18 changes: 9 additions & 9 deletions src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ pub fn __exec_and_deserialize<T: DeserializeOwned, I: IntoIterator<Item = Value>
/// };
/// }
/// ")]
/// MyJsScript {
/// fn concat(x: &str, y: &str) -> String;
/// fn multiply(a: i32, b: i32) -> i32;
/// fn current_user() -> User;
/// pub MyJsScript {
/// pub fn concat(x: &str, y: &str) -> String;
/// pub fn multiply(a: i32, b: i32) -> i32;
/// pub fn current_user() -> User;
/// }
/// }
///
Expand Down Expand Up @@ -129,7 +129,7 @@ macro_rules! declare_script {
}

impl $struct_name {
pub fn new() -> ::core::result::Result<$struct_name, $crate::ScriptCompilationError> {
$vis fn new() -> ::core::result::Result<$struct_name, $crate::ScriptCompilationError> {
let mut script = $crate::Script::new_from_source(
$crate::Language::$language,
$source
Expand Down Expand Up @@ -220,10 +220,10 @@ mod test {
throw new Error(message);
}
")]
MacroTestScript {
fn concat(x: &str, y: &str) -> String;
fn no_args_no_result();
fn throws_an_error(message: &str);
pub(crate) MacroTestScript {
pub(crate) fn concat(x: &str, y: &str) -> String;
pub(crate) fn no_args_no_result();
pub(crate) fn throws_an_error(message: &str);
}
}

Expand Down

0 comments on commit 434c674

Please sign in to comment.