fix typos in strings
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
This commit is contained in:
parent
c88cdd7e67
commit
c8b975799b
@ -25,7 +25,7 @@ async fn run() -> Result<(), Error> {
|
|||||||
None => bail!("missing username or --check parameter"),
|
None => bail!("missing username or --check parameter"),
|
||||||
Some(ck) if ck == "--check" => (
|
Some(ck) if ck == "--check" => (
|
||||||
args.next()
|
args.next()
|
||||||
.ok_or_else(|| format_err!("expected username as paramter"))?
|
.ok_or_else(|| format_err!("expected username as parameter"))?
|
||||||
.try_into()?,
|
.try_into()?,
|
||||||
false,
|
false,
|
||||||
),
|
),
|
||||||
|
@ -400,7 +400,7 @@ impl HttpApiClient for Client {
|
|||||||
T: ?Sized + Serialize,
|
T: ?Sized + Serialize,
|
||||||
{
|
{
|
||||||
let params = serde_json::to_string(params)
|
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 {
|
Box::pin(async move {
|
||||||
let params = params?;
|
let params = params?;
|
||||||
@ -425,7 +425,7 @@ impl HttpApiClient for Client {
|
|||||||
T: ?Sized + Serialize,
|
T: ?Sized + Serialize,
|
||||||
{
|
{
|
||||||
let params = serde_json::to_string(params)
|
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 {
|
Box::pin(async move {
|
||||||
let params = params?;
|
let params = params?;
|
||||||
|
@ -200,7 +200,7 @@ const API_METHOD_COMMAND_HELP: ApiMethod = ApiMethod::new(
|
|||||||
"command",
|
"command",
|
||||||
true,
|
true,
|
||||||
&ArraySchema::new(
|
&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(),
|
&StringSchema::new("Name.").schema(),
|
||||||
)
|
)
|
||||||
.schema(),
|
.schema(),
|
||||||
|
@ -151,7 +151,7 @@ fn expected_nested_usage_text() -> &'static str {
|
|||||||
Get help about specified command (or sub-command).
|
Get help about specified command (or sub-command).
|
||||||
|
|
||||||
``<command>`` : ``<string>``
|
``<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.
|
specified more than once.
|
||||||
|
|
||||||
Optional parameters:
|
Optional parameters:
|
||||||
|
@ -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) => {
|
Value::Array(ref mut array) => {
|
||||||
array.push(Value::String(value.to_string()));
|
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 {
|
} else {
|
||||||
errors.push(
|
errors.push(
|
||||||
|
@ -338,7 +338,7 @@ fn test_verify_complex_object() {
|
|||||||
fn test_verify_complex_array() {
|
fn test_verify_complex_array() {
|
||||||
{
|
{
|
||||||
const PARAM_SCHEMA: Schema =
|
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(
|
const SCHEMA: ObjectSchema = ObjectSchema::new(
|
||||||
"Parameters.",
|
"Parameters.",
|
||||||
@ -369,7 +369,7 @@ fn test_verify_complex_array() {
|
|||||||
|
|
||||||
{
|
{
|
||||||
const PARAM_SCHEMA: Schema =
|
const PARAM_SCHEMA: Schema =
|
||||||
ArraySchema::new("Integer List.", &IntegerSchema::new("Soemething").schema())
|
ArraySchema::new("Integer List.", &IntegerSchema::new("Something").schema())
|
||||||
.min_length(1)
|
.min_length(1)
|
||||||
.max_length(3)
|
.max_length(3)
|
||||||
.schema();
|
.schema();
|
||||||
|
@ -702,7 +702,7 @@ impl SectionConfig {
|
|||||||
_data: &Value,
|
_data: &Value,
|
||||||
) -> Result<String, Error> {
|
) -> Result<String, Error> {
|
||||||
if type_name != section_id {
|
if type_name != section_id {
|
||||||
bail!("gut unexpexted section type");
|
bail!("gut unexpected section type");
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(format!("[{}]\n", section_id))
|
Ok(format!("[{}]\n", section_id))
|
||||||
|
@ -227,7 +227,7 @@ impl Totp {
|
|||||||
pub fn builder_from_hex(secret: &str) -> Result<TotpBuilder, Error> {
|
pub fn builder_from_hex(secret: &str) -> Result<TotpBuilder, Error> {
|
||||||
Ok(Self::builder().secret(
|
Ok(Self::builder().secret(
|
||||||
hex::decode(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))?,
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,24 +149,24 @@ mod test {
|
|||||||
|
|
||||||
if duration.start.hour != start_h {
|
if duration.start.hour != start_h {
|
||||||
bail!(
|
bail!(
|
||||||
"start hour missmatch, extected {}, got {:?}",
|
"start hour mismatch, extected {}, got {:?}",
|
||||||
start_h,
|
start_h,
|
||||||
duration
|
duration
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if duration.start.minute != start_m {
|
if duration.start.minute != start_m {
|
||||||
bail!(
|
bail!(
|
||||||
"start minute missmatch, extected {}, got {:?}",
|
"start minute mismatch, extected {}, got {:?}",
|
||||||
start_m,
|
start_m,
|
||||||
duration
|
duration
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if duration.end.hour != end_h {
|
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 {
|
if duration.end.minute != end_m {
|
||||||
bail!(
|
bail!(
|
||||||
"end minute missmatch, extected {}, got {:?}",
|
"end minute mismatch, extected {}, got {:?}",
|
||||||
end_m,
|
end_m,
|
||||||
duration
|
duration
|
||||||
);
|
);
|
||||||
@ -174,7 +174,7 @@ mod test {
|
|||||||
|
|
||||||
if duration.days != expected_days {
|
if duration.days != expected_days {
|
||||||
bail!(
|
bail!(
|
||||||
"weekday missmatch, extected {:?}, got {:?}",
|
"weekday mismatch, extected {:?}, got {:?}",
|
||||||
expected_days,
|
expected_days,
|
||||||
duration
|
duration
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user