Skip to content

Commit 91713a4

Browse files
KSXGitHubanonrig
authored andcommitted
feat: remove mut
1 parent b259267 commit 91713a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@ impl Url {
121121
/// ```
122122
/// use ada_url::Url;
123123
///
124-
/// let mut url = Url::parse("blob:https://example.com/foo", None).expect("Invalid URL");
124+
/// let url = Url::parse("blob:https://example.com/foo", None).expect("Invalid URL");
125125
/// assert_eq!(url.origin(), "https://example.com");
126126
/// ```
127-
pub fn origin(&mut self) -> &str {
127+
pub fn origin(&self) -> &str {
128128
unsafe {
129129
let out = ffi::ada_get_origin(self.url);
130130
let slice = std::slice::from_raw_parts(out.data.cast(), out.length);

0 commit comments

Comments
 (0)