diff options
| author | KyleMiles <krm504@nyu.edu> | 2021-05-11 22:51:38 -0400 |
|---|---|---|
| committer | KyleMiles <krm504@nyu.edu> | 2021-05-11 22:51:38 -0400 |
| commit | 21da3f95b00431f4d10d8b5e67ee402bffde129c (patch) | |
| tree | bd7a738ca45b4aac7572f5ecee8924cd3feaebf2 /rust/src/string.rs | |
| parent | 4bd1f6b1477b910b580a0bcfcde118bcefc1ddc0 (diff) | |
Rust API; More setting support, fix edgecase in open_view_with_options, and fixed using mut for const correctness (mut != ~const)
Diffstat (limited to 'rust/src/string.rs')
| -rw-r--r-- | rust/src/string.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/rust/src/string.rs b/rust/src/string.rs index 5b20532e..e042dbdd 100644 --- a/rust/src/string.rs +++ b/rust/src/string.rs @@ -111,6 +111,10 @@ impl BnString { res } + + pub fn as_str(&self) -> &str { + unsafe { BnStr::from_raw(self.raw).as_str() } + } } impl Drop for BnString { |
