replacement in fluent_embed_interaction/src/prompt/select.rs at line 2
− use crate::{InteractionEnvironment, InteractionError, NON_INTERACTIVE_MESSAGE};
+ use crate::{InteractionEnvironment, InteractionError};
replacement in fluent_embed_interaction/src/prompt/select.rs at line 27
[3.1149]→[3.1149:1250](∅→∅) − pub fn interact(self, environment: &InteractionEnvironment) -> Result<usize, InteractionError> {
+ pub fn interact(
+ self,
+ environment: &InteractionEnvironment,
+ ) -> Result<Option<usize>, InteractionError> {
replacement in fluent_embed_interaction/src/prompt/select.rs at line 47
[3.1810]→[3.1810:1849](∅→∅) + Ok(Some(prompt.interact()?))
replacement in fluent_embed_interaction/src/prompt/select.rs at line 49
[3.1863]→[3.1863:1957](∅→∅) − crate::InteractionContext::NonInteractive => panic!("{NON_INTERACTIVE_MESSAGE}"),
+ crate::InteractionContext::NonInteractive => Ok(None),
replacement in fluent_embed_interaction/src/prompt/password.rs at line 2
[3.2083]→[3.2083:2163](∅→∅) − use crate::{InteractionEnvironment, InteractionError, NON_INTERACTIVE_MESSAGE};
+ use crate::{InteractionEnvironment, InteractionError};
replacement in fluent_embed_interaction/src/prompt/password.rs at line 41
[3.3305]→[3.3305:3349](∅→∅) − ) -> Result<String, InteractionError> {
+ ) -> Result<Option<String>, InteractionError> {
replacement in fluent_embed_interaction/src/prompt/password.rs at line 59
[3.4010]→[3.4010:4049](∅→∅) + Ok(Some(prompt.interact()?))
replacement in fluent_embed_interaction/src/prompt/password.rs at line 61
[3.4063]→[3.4063:4157](∅→∅) − crate::InteractionContext::NonInteractive => panic!("{NON_INTERACTIVE_MESSAGE}"),
+ crate::InteractionContext::NonInteractive => Ok(None),
replacement in fluent_embed_interaction/src/prompt/input.rs at line 2
[3.6559]→[3.6559:6639](∅→∅) − use crate::{InteractionEnvironment, InteractionError, NON_INTERACTIVE_MESSAGE};
+ use crate::{InteractionEnvironment, InteractionError};
replacement in fluent_embed_interaction/src/prompt/input.rs at line 27
[3.7322]→[3.7322:7366](∅→∅) − ) -> Result<String, InteractionError> {
+ ) -> Result<Option<String>, InteractionError> {
replacement in fluent_embed_interaction/src/prompt/input.rs at line 44
[3.7939]→[3.7939:7978](∅→∅) + Ok(Some(prompt.interact()?))
replacement in fluent_embed_interaction/src/prompt/input.rs at line 46
[3.7992]→[3.7992:8086](∅→∅) − crate::InteractionContext::NonInteractive => panic!("{NON_INTERACTIVE_MESSAGE}"),
+ crate::InteractionContext::NonInteractive => Ok(None),
replacement in fluent_embed_interaction/src/prompt/confirm.rs at line 2
[3.8209]→[3.8209:8289](∅→∅) − use crate::{InteractionEnvironment, InteractionError, NON_INTERACTIVE_MESSAGE};
+ use crate::{InteractionEnvironment, InteractionError};
replacement in fluent_embed_interaction/src/prompt/confirm.rs at line 15
[3.8536]→[3.8536:8636](∅→∅) − pub fn interact(self, environment: &InteractionEnvironment) -> Result<bool, InteractionError> {
+ pub fn interact(
+ self,
+ environment: &InteractionEnvironment,
+ ) -> Result<Option<bool>, InteractionError> {
replacement in fluent_embed_interaction/src/prompt/confirm.rs at line 31
[3.9072]→[3.9072:9111](∅→∅) + Ok(Some(prompt.interact()?))
replacement in fluent_embed_interaction/src/prompt/confirm.rs at line 33
[3.9125]→[3.9125:9219](∅→∅) − crate::InteractionContext::NonInteractive => panic!("{NON_INTERACTIVE_MESSAGE}"),
+ crate::InteractionContext::NonInteractive => Ok(None),
edit in fluent_embed_interaction/src/lib.rs at line 12
[3.1849]→[3.9386:9387](∅→∅),
[3.9386]→[3.9386:9387](∅→∅),
[3.9507]→[3.9507:9606](∅→∅) −
− const NON_INTERACTIVE_MESSAGE: &str = "Attempted to prompt the user in a non-interactive context";
replacement in fluent_embed_interaction/src/editor.rs at line 1
[3.10371]→[3.10372:10479](∅→∅) − use crate::{
− InteractionContext, InteractionEnvironment, InteractionError, NON_INTERACTIVE_MESSAGE,
− };
+ use crate::{InteractionContext, InteractionEnvironment, InteractionError};
replacement in fluent_embed_interaction/src/editor.rs at line 14
[3.10548]→[2.457:502](∅→∅) − #[must_use] pub const fn new() -> Self {
+ #[must_use]
+ pub const fn new() -> Self {
replacement in fluent_embed_interaction/src/editor.rs at line 19
[3.10615]→[2.503:578](∅→∅) − #[must_use] pub fn with_extension(mut self, extension: &str) -> Self {
+ #[must_use]
+ pub fn with_extension(mut self, extension: &str) -> Self {
replacement in fluent_embed_interaction/src/editor.rs at line 40
[3.11224]→[3.11224:11311](∅→∅) − InteractionContext::NonInteractive => panic!("{NON_INTERACTIVE_MESSAGE}"),
+ InteractionContext::NonInteractive => Ok(None),