Skip to content

Commit 4f210ca

Browse files
committed
add some docs
1 parent 0b21062 commit 4f210ca

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/workflows/check.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,5 @@ jobs:
109109
- name: Run tests
110110
run: |
111111
bash ./tools/setup_byond_linux.sh
112-
$Env:RUST_BACKTRACE = 1
113112
source $HOME/BYOND/byond/bin/byondsetup
114-
cargo test --package byondapi-test --target i686-unknown-linux-gnu --test test -- test_byondapi_with_dreamdaemon --exact --nocapture
113+
RUST_BACKTRACE=1 cargo test --package byondapi-test --target i686-unknown-linux-gnu --test test -- test_byondapi_with_dreamdaemon --exact --nocapture

crates/byondapi-rs/src/value/builtins.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@ use super::ByondValue;
22
use crate::{static_global::byond, Error};
33

44
impl ByondValue {
5+
/// Try to get a length of a string in bytes, lists in number of assoc elements probably, will fail if it's neither a list or string
56
pub fn builtin_length(&self) -> Result<ByondValue, Error> {
67
let mut result = ByondValue::new();
78
unsafe {
89
map_byond_error!(byond().Byond_Length(&self.0, &mut result.0))?;
910
}
1011
Ok(result)
1112
}
13+
/// Try to create a new byond object, equivalent to byond's new
1214
pub fn builtin_new(
1315
value_type: ByondValue,
1416
arglist: &[ByondValue],
@@ -24,7 +26,7 @@ impl ByondValue {
2426
}
2527
Ok(result)
2628
}
27-
29+
/// Try to create a new byond object, equivalent to byond's new, but takes a list as arguments instead
2830
pub fn builtin_newarglist(
2931
value_type: ByondValue,
3032
arglist: ByondValue,

0 commit comments

Comments
 (0)