summaryrefslogtreecommitdiffstats
path: root/src/column.rs
diff options
context:
space:
mode:
authornwin <nwin@users.noreply.github.com>2015-02-22 13:26:20 +0100
committernwin <nwin@users.noreply.github.com>2015-02-22 13:26:20 +0100
commit376e417c3f8b68dd3e77dbd8359f926861b53c98 (patch)
tree2169d46e2d9b98ab605df05d327a90047e5b645d /src/column.rs
parenta4e17193d990340b163efceff8eb5e513199d704 (diff)
Replace &String with &str
Diffstat (limited to 'src/column.rs')
-rw-r--r--src/column.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/column.rs b/src/column.rs
index 11aae59..8e1ce43 100644
--- a/src/column.rs
+++ b/src/column.rs
@@ -68,7 +68,7 @@ impl Alignment {
/// of spaces to add: this is because the strings are usually full of
/// invisible control characters, so getting the displayed width of the
/// string is not as simple as just getting its length.
- pub fn pad_string(&self, string: &String, padding: usize) -> String {
+ pub fn pad_string(&self, string: &str, padding: usize) -> String {
match *self {
Alignment::Left => format!("{}{}", string, spaces(padding).as_slice()),
Alignment::Right => format!("{}{}", spaces(padding), string.as_slice()),