fixed a bug in fixed_width
This commit is contained in:
parent
066a86539e
commit
d9c63253aa
|
@ -14,7 +14,7 @@ fn fixed_width(input: &String, len: usize) -> String
|
||||||
{
|
{
|
||||||
let cut_to = len - 1_usize;
|
let cut_to = len - 1_usize;
|
||||||
let start_from = clen - cut_to;
|
let start_from = clen - cut_to;
|
||||||
let cutted_result = &input[start_from..];
|
let cutted_result: String = input.chars().skip(start_from).collect();
|
||||||
let mut result: String = String::from(PLACE_HOLDER);
|
let mut result: String = String::from(PLACE_HOLDER);
|
||||||
|
|
||||||
result.push_str(&cutted_result);
|
result.push_str(&cutted_result);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user