Skip to content

Commit

Permalink
map_or interactive.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-ha458 committed Sep 16, 2023
1 parent e39ab03 commit 879ae51
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions binaries/llm-cli/src/interactive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,7 @@ fn session_ends_with_newline(session: &llm::InferenceSession) -> bool {
session
.decoded_tokens()
.last()
.map(|t| *t == b'\n')
.unwrap_or(true)
.map_or(true, |t| *t == b'\n')
}

fn readline_loop(mut body: impl FnMut(String) -> eyre::Result<()>) -> eyre::Result<()> {
Expand Down

0 comments on commit 879ae51

Please sign in to comment.