E0057#
Constructor pattern expect payload.
The warning is emitted when the payload part is missing from the constructor pattern.
错误示例#
///|
pub fn[T] is_some(s : T?) -> Bool {
match s {
Some => true
None => false
}
}
建议#
Use (_)
to ignore all the payloads.
///|
pub fn[T] is_some(s : T?) -> Bool {
match s {
Some(_) => true
None => false
}
}