File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
crates/byondapi-rs/src/value Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -109,6 +109,5 @@ jobs:
109
109
- name : Run tests
110
110
run : |
111
111
bash ./tools/setup_byond_linux.sh
112
- $Env:RUST_BACKTRACE = 1
113
112
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
Original file line number Diff line number Diff line change @@ -2,13 +2,15 @@ use super::ByondValue;
2
2
use crate :: { static_global:: byond, Error } ;
3
3
4
4
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
5
6
pub fn builtin_length ( & self ) -> Result < ByondValue , Error > {
6
7
let mut result = ByondValue :: new ( ) ;
7
8
unsafe {
8
9
map_byond_error ! ( byond( ) . Byond_Length ( & self . 0 , & mut result. 0 ) ) ?;
9
10
}
10
11
Ok ( result)
11
12
}
13
+ /// Try to create a new byond object, equivalent to byond's new
12
14
pub fn builtin_new (
13
15
value_type : ByondValue ,
14
16
arglist : & [ ByondValue ] ,
@@ -24,7 +26,7 @@ impl ByondValue {
24
26
}
25
27
Ok ( result)
26
28
}
27
-
29
+ /// Try to create a new byond object, equivalent to byond's new, but takes a list as arguments instead
28
30
pub fn builtin_newarglist (
29
31
value_type : ByondValue ,
30
32
arglist : ByondValue ,
You can’t perform that action at this time.
0 commit comments