Skip to content

Instantly share code, notes, and snippets.

@ironhouzi
Last active March 5, 2017 20:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ironhouzi/af01b1e58bd53ce2fb048621abbd9ddd to your computer and use it in GitHub Desktop.
Save ironhouzi/af01b1e58bd53ce2fb048621abbd9ddd to your computer and use it in GitHub Desktop.
mismatched types error
pub mod table;
fn sanskrit_quickcheck(string: &str) -> bool {
for r in &table::S_BASIC_RULES {
if string.starts_swith(r) { // rustc: no method named `starts_swith` found for type `&str` in the current scope
return true;
}
}
false
}
pub const S_BASIC_RULES: [&'static str; 25] =
["phyw", "ghr", "hra", "hwa", "tsy", "trw", "rdh", "sye", "n.y", "gh", "dh", "cy", "jh", "nn",
"mm", "ww", "yy", "rr", "hy", "ty", "tv", "tw", "tz", "bh", "ss"];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment