mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 02:39:20 +00:00
refactor: fix warns
This commit is contained in:
parent
cf726fe4a8
commit
edfabd97e7
14 changed files with 22 additions and 22 deletions
|
@ -174,7 +174,7 @@ impl Context {
|
|||
.union_pair()
|
||||
.map(|(t1, t2)| format!("cannot {verb} {t1} {preposition} {t2}"))
|
||||
.or_else(|| {
|
||||
expected.inner_ts().get(0).map(|expected_inner| {
|
||||
expected.inner_ts().first().map(|expected_inner| {
|
||||
let expected_inner = self.readable_type(expected_inner.clone());
|
||||
format!("cannot {verb} {found} {preposition} {expected_inner}")
|
||||
})
|
||||
|
@ -237,7 +237,7 @@ impl Context {
|
|||
if let Some(fv) = lhs.as_free() {
|
||||
let (sub, sup) = fv.get_subsup()?;
|
||||
let (verb, preposition, sequence) = Self::get_verb_and_preposition(&sup)?;
|
||||
let sup = *option_enum_unwrap!(sup.typarams().get(0)?.clone(), TyParam::Type)?;
|
||||
let sup = *option_enum_unwrap!(sup.typarams().first()?.clone(), TyParam::Type)?;
|
||||
let sup = self.readable_type(sup);
|
||||
let (l, r) = if sequence == Sequence::Forward {
|
||||
(sub, sup)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue