string: remove unnecessary refcount update
Passing the argument to a pure function is essentially a "borrow", and the caller has had to make sure the refcount doesn't drop to zero anyway
This commit is contained in:
parent
5aed426864
commit
b011d5feb5
1 changed files with 0 additions and 2 deletions
|
@ -48,7 +48,6 @@ string *leftpad(const string *s, usize len, nchar fillchr, error *err)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
nget(s);
|
|
||||||
string *padded;
|
string *padded;
|
||||||
|
|
||||||
if (len < s->_len) {
|
if (len < s->_len) {
|
||||||
|
@ -60,7 +59,6 @@ string *leftpad(const string *s, usize len, nchar fillchr, error *err)
|
||||||
padded = leftpad_unsafe(s, len, fillchr, err);
|
padded = leftpad_unsafe(s, len, fillchr, err);
|
||||||
}
|
}
|
||||||
|
|
||||||
nput(s);
|
|
||||||
return padded;
|
return padded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue