Skip to content

Commit

Permalink
chore(deps): set nix input to latest-release branch
Browse files Browse the repository at this point in the history
Co-authored-by: ruben beck <[email protected]>
Co-authored-by: Ishwar <[email protected]>
  • Loading branch information
3 people committed Apr 11, 2024
1 parent b478c9d commit 307e422
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 55 deletions.
56 changes: 21 additions & 35 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
inputs.fenix.url = "github:nix-community/fenix";
inputs.flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.nix.url = "github:NixOS/nix/2.18.2";
inputs.nix.inputs.nixpkgs.follows = "nixpkgs";
inputs.nix.url = "github:NixOS/nix/latest-release";

outputs = {
self,
Expand Down
18 changes: 2 additions & 16 deletions src/app/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ impl State {
acc.push(ch.into());
let string = String::from_utf8(strip_ansi_escapes::strip(acc)?)?;

if string == "nix-repl> " {
if string.ends_with("nix-repl> ") {
session_live.expecting = ReplSessionExpecting::Nothing;
self.next_query(&id)?
} else {
Expand All @@ -158,7 +158,7 @@ impl State {
expected_result: expected_result.clone(),
}
} else {
ReplSessionExpecting::BlankLine { saw_cr: false }
ReplSessionExpecting::Prompt(String::new())
};
vec![]
} else {
Expand Down Expand Up @@ -188,20 +188,6 @@ impl State {
session_live.expecting = ReplSessionExpecting::Prompt(String::new());
vec![]
}
ReplSessionExpecting::BlankLine { saw_cr: false } => {
anyhow::ensure!(
ch == b'\r',
"expecting carriage return, got {:?}",
ch as char,
);
session_live.expecting = ReplSessionExpecting::BlankLine { saw_cr: true };
vec![]
}
ReplSessionExpecting::BlankLine { saw_cr: true } => {
anyhow::ensure!(ch == b'\n', "expecting line feed, got {:?}", ch as char,);
session_live.expecting = ReplSessionExpecting::Prompt(String::new());
vec![]
}
};

Ok(output)
Expand Down
3 changes: 0 additions & 3 deletions src/app/state/repl_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ pub(crate) enum ReplSessionExpecting {
acc: String,
expected_result: ExpectedResult,
},
BlankLine {
saw_cr: bool,
},
}

impl ReplSessionLive {
Expand Down

0 comments on commit 307e422

Please sign in to comment.