We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d07f40a commit f6d0f8eCopy full SHA for f6d0f8e
active/0000-collections-conventions.md
@@ -418,10 +418,10 @@ impl<A: Clone> ToOwned for A {
418
impl Borrow for str {
419
type Owned = String;
420
fn borrow(s: &String) -> &str {
421
- self.as_slice()
+ s.as_slice()
422
}
423
fn borrow_mut(s: &mut String) -> &mut str {
424
- self.as_mut_slice()
+ s.as_mut_slice()
425
426
427
@@ -434,10 +434,10 @@ impl ToOwned for str {
434
impl<T> Borrow for [T] {
435
type Owned = Vec<T>;
436
fn borrow(s: &Vec<T>) -> &[T] {
437
438
439
fn borrow_mut(s: &mut Vec<T>) -> &mut [T] {
440
441
442
443
0 commit comments