fix typos

This commit is contained in:
Emil Gardström
2024-03-29 14:26:41 +01:00
parent 1d51ee0486
commit 3254e4ad30
2 changed files with 20 additions and 20 deletions

View File

@@ -29,7 +29,7 @@ where
{
pub aliases: Vec<String>,
pub value: Option<P>,
pub depricated: bool,
pub deprecated: bool,
}
fn write_repr_enum<T: std::io::Write, I, P>(
@@ -58,13 +58,13 @@ fn write_repr_enum<T: std::io::Write, I, P>(
.map(|s| format!("serialize = \"{s}\""))
.collect::<Vec<String>>()
.join(", ");
let depricated_str = if variant.depricated {
", depricated = \"true\"".to_string()
let deprecated_str = if variant.deprecated {
", deprecated = \"true\"".to_string()
} else {
"".to_string()
};
let props_str = if let Some(val) = &variant.value {
format!(", props( value = \"{val}\"{depricated_str})")
format!(", props( value = \"{val}\"{deprecated_str})")
} else {
"".to_string()
};
@@ -94,7 +94,7 @@ fn write_logictypes() {
let val_str = it.next().unwrap();
let val: Option<u8> = val_str.parse().ok();
let docs = it.next();
let depricated = docs
let deprecated = docs
.map(|docs| docs.trim().to_uppercase() == "DEPRECATED")
.unwrap_or(false);
@@ -104,14 +104,14 @@ fn write_logictypes() {
.find(|(_, variant)| variant.value == Some(val))
{
variant.aliases.push(name.to_string());
variant.depricated = depricated;
variant.deprecated = deprecated;
} else {
logictypes.insert(
name.to_string(),
EnumVariant {
aliases: Vec::new(),
value: Some(val),
depricated,
deprecated,
},
);
}
@@ -121,7 +121,7 @@ fn write_logictypes() {
EnumVariant {
aliases: Vec::new(),
value: val,
depricated,
deprecated,
},
);
}
@@ -137,7 +137,7 @@ fn write_logictypes() {
let val_str = it.next().unwrap();
let val: Option<u8> = val_str.parse().ok();
let docs = it.next();
let depricated = docs
let deprecated = docs
.map(|docs| docs.trim().to_uppercase() == "DEPRECATED")
.unwrap_or(false);
@@ -147,14 +147,14 @@ fn write_logictypes() {
.find(|(_, variant)| variant.value == Some(val))
{
variant.aliases.push(name.to_string());
variant.depricated = depricated;
variant.deprecated = deprecated;
} else {
slotlogictypes.insert(
name.to_string(),
EnumVariant {
aliases: Vec::new(),
value: Some(val),
depricated,
deprecated,
},
);
}
@@ -164,7 +164,7 @@ fn write_logictypes() {
EnumVariant {
aliases: Vec::new(),
value: val,
depricated,
deprecated,
},
);
}
@@ -244,7 +244,7 @@ fn write_modes() {
EnumVariant {
aliases: Vec::new(),
value: Some(val),
depricated: false,
deprecated: false,
},
);
}
@@ -254,7 +254,7 @@ fn write_modes() {
EnumVariant {
aliases: Vec::new(),
value: val,
depricated: false,
deprecated: false,
},
);
}
@@ -282,7 +282,7 @@ fn write_modes() {
EnumVariant {
aliases: Vec::new(),
value: Some(val),
depricated: false,
deprecated: false,
},
);
}
@@ -292,7 +292,7 @@ fn write_modes() {
EnumVariant {
aliases: Vec::new(),
value: val,
depricated: false,
deprecated: false,
},
);
}

View File

@@ -31,7 +31,7 @@ impl Error for LineError {}
#[derive(Debug, Error, Clone, Serialize, Deserialize)]
pub enum ICError {
#[error("Error Compileing Code: {0}")]
#[error("Error Compiling Code: {0}")]
ParseError(#[from] ParseError),
#[error("Duplicate label {0}")]
DuplicateLabel(String),
@@ -100,7 +100,7 @@ pub enum ICError {
#[error("Connection index out of range: '{0}'")]
ConnecitonIndexOutOFRange(u32),
#[error("Connection specifier missing")]
MissingConnecitonSpecifier,
MissingConnectionSpecifier,
#[error("No data network on connection '{0}'")]
NotDataConnection(u32),
#[error("Network not connected on connection '{0}'")]
@@ -3235,7 +3235,7 @@ impl IC {
if CHANNEL_LOGIC_TYPES.contains(&lt) {
let channel = lt.as_channel().unwrap();
let Some(connection) = connection else {
break 'inst Err(MissingConnecitonSpecifier);
break 'inst Err(MissingConnectionSpecifier);
};
let network_id = vm
.get_device_same_network(self.device, device_id)
@@ -3389,7 +3389,7 @@ impl IC {
if CHANNEL_LOGIC_TYPES.contains(&lt) {
let channel = lt.as_channel().unwrap();
let Some(connection) = connection else {
break 'inst Err(MissingConnecitonSpecifier);
break 'inst Err(MissingConnectionSpecifier);
};
let network_id = vm
.get_device_same_network(self.device, device_id)