fix typos in strings

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
This commit is contained in:
Maximiliano Sandoval 2024-07-18 15:05:34 +02:00 committed by Thomas Lamprecht
parent c88cdd7e67
commit c8b975799b
9 changed files with 16 additions and 16 deletions

View File

@ -25,7 +25,7 @@ async fn run() -> Result<(), Error> {
None => bail!("missing username or --check parameter"),
Some(ck) if ck == "--check" => (
args.next()
.ok_or_else(|| format_err!("expected username as paramter"))?
.ok_or_else(|| format_err!("expected username as parameter"))?
.try_into()?,
false,
),

View File

@ -400,7 +400,7 @@ impl HttpApiClient for Client {
T: ?Sized + Serialize,
{
let params = serde_json::to_string(params)
.map_err(|err| Error::internal("failed to serialize parametres", err));
.map_err(|err| Error::internal("failed to serialize parameters", err));
Box::pin(async move {
let params = params?;
@ -425,7 +425,7 @@ impl HttpApiClient for Client {
T: ?Sized + Serialize,
{
let params = serde_json::to_string(params)
.map_err(|err| Error::internal("failed to serialize parametres", err));
.map_err(|err| Error::internal("failed to serialize parameters", err));
Box::pin(async move {
let params = params?;

View File

@ -200,7 +200,7 @@ const API_METHOD_COMMAND_HELP: ApiMethod = ApiMethod::new(
"command",
true,
&ArraySchema::new(
"Command. This may be a list in order to spefify nested sub-commands.",
"Command. This may be a list in order to specify nested sub-commands.",
&StringSchema::new("Name.").schema(),
)
.schema(),

View File

@ -151,7 +151,7 @@ fn expected_nested_usage_text() -> &'static str {
Get help about specified command (or sub-command).
``<command>`` : ``<string>``
Command. This may be a list in order to spefify nested sub-commands. Can be
Command. This may be a list in order to specify nested sub-commands. Can be
specified more than once.
Optional parameters:

View File

@ -1650,7 +1650,7 @@ fn do_parse_parameter_strings(
}
}
_ => {
errors.push(key.into(), format_err!("expected array - type missmatch"))
errors.push(key.into(), format_err!("expected array - type mismatch"))
}
}
}
@ -1679,7 +1679,7 @@ fn do_parse_parameter_strings(
Value::Array(ref mut array) => {
array.push(Value::String(value.to_string()));
}
_ => errors.push(key.into(), format_err!("expected array - type missmatch")),
_ => errors.push(key.into(), format_err!("expected array - type mismatch")),
}
} else {
errors.push(

View File

@ -338,7 +338,7 @@ fn test_verify_complex_object() {
fn test_verify_complex_array() {
{
const PARAM_SCHEMA: Schema =
ArraySchema::new("Integer List.", &IntegerSchema::new("Soemething").schema()).schema();
ArraySchema::new("Integer List.", &IntegerSchema::new("Something").schema()).schema();
const SCHEMA: ObjectSchema = ObjectSchema::new(
"Parameters.",
@ -369,7 +369,7 @@ fn test_verify_complex_array() {
{
const PARAM_SCHEMA: Schema =
ArraySchema::new("Integer List.", &IntegerSchema::new("Soemething").schema())
ArraySchema::new("Integer List.", &IntegerSchema::new("Something").schema())
.min_length(1)
.max_length(3)
.schema();

View File

@ -702,7 +702,7 @@ impl SectionConfig {
_data: &Value,
) -> Result<String, Error> {
if type_name != section_id {
bail!("gut unexpexted section type");
bail!("gut unexpected section type");
}
Ok(format!("[{}]\n", section_id))

View File

@ -227,7 +227,7 @@ impl Totp {
pub fn builder_from_hex(secret: &str) -> Result<TotpBuilder, Error> {
Ok(Self::builder().secret(
hex::decode(secret)
.map_err(|err| Error::decode("not a valid hexademical string", err))?,
.map_err(|err| Error::decode("not a valid hexadecimal string", err))?,
))
}

View File

@ -149,24 +149,24 @@ mod test {
if duration.start.hour != start_h {
bail!(
"start hour missmatch, extected {}, got {:?}",
"start hour mismatch, extected {}, got {:?}",
start_h,
duration
);
}
if duration.start.minute != start_m {
bail!(
"start minute missmatch, extected {}, got {:?}",
"start minute mismatch, extected {}, got {:?}",
start_m,
duration
);
}
if duration.end.hour != end_h {
bail!("end hour missmatch, extected {}, got {:?}", end_h, duration);
bail!("end hour mismatch, extected {}, got {:?}", end_h, duration);
}
if duration.end.minute != end_m {
bail!(
"end minute missmatch, extected {}, got {:?}",
"end minute mismatch, extected {}, got {:?}",
end_m,
duration
);
@ -174,7 +174,7 @@ mod test {
if duration.days != expected_days {
bail!(
"weekday missmatch, extected {:?}, got {:?}",
"weekday mismatch, extected {:?}, got {:?}",
expected_days,
duration
);