Skip to content

Commit

Permalink
Make leak function private
Browse files Browse the repository at this point in the history
The leak function is never used outside of interning.rs
and I don't think it makes any sense to use it.
  • Loading branch information
est31 committed Jun 26, 2020
1 parent 7f73a6c commit 836e91c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cargo/util/interning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use std::ptr;
use std::str;
use std::sync::Mutex;

pub fn leak(s: String) -> &'static str {
fn leak(s: String) -> &'static str {
Box::leak(s.into_boxed_str())
}

Expand Down

0 comments on commit 836e91c

Please sign in to comment.