Hi,
In the following code, it will register the name and value into &self, which is an immut reference. Is it a violation of Rust's reference or designed behavior?
|
pub fn register_var(&self, name: String, value: String) { |
|
let n = CString::new(name).unwrap(); |
|
let v = CString::new(value).unwrap(); |
|
unsafe { |
|
ucl_parser_register_variable(self.parser, n.as_ptr(), v.as_ptr()) |
|
} |
|
} |
Hi,
In the following code, it will register the
nameandvalueinto &self, which is an immut reference. Is it a violation of Rust's reference or designed behavior?libucl-rs/libucl/src/parser.rs
Lines 108 to 114 in 30360ec