read_input icon indicating copy to clipboard operation
read_input copied to clipboard

newline in the err() method

Open eopb opened this issue 4 years ago • 0 comments

Copied from https://gitlab.com/efunb/read_input/-/issues/5

It seems that the err() method automatically append a newline character at the end. Is it possible to not add this newline and let the user add it if necessary? I have the following code:

    let input = input::<u8>()
        .msg("What's your age: ")
        .err("That's not correct, try again: ").get();

The user input for msg() is at the same line with What's your age: . I want the user's next try is also at the same line with That's not correct, try again:. That will make the UI a little bit more clean. Thanks.

eopb avatar Aug 20 '21 08:08 eopb