Skip to content

Commit

Permalink
From<&str> for JSString doesn't need lifetimes.
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys committed Nov 12, 2023
1 parent 3ca4210 commit 693bb43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ impl PartialEq<JSString> for String {
}
}

impl<'s> From<&'s str> for JSString {
fn from(s: &'s str) -> Self {
impl From<&str> for JSString {
fn from(s: &str) -> Self {
let c = CString::new(s.as_bytes()).unwrap();
JSString {
raw: unsafe { sys::JSStringCreateWithUTF8CString(c.as_ptr()) },
Expand Down

0 comments on commit 693bb43

Please sign in to comment.