Skip to content

Commit 5c0f11e

Browse files
committed
replace most todo!()s with unimplemented!() for consistency
1 parent 4a6c383 commit 5c0f11e

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

crates/kotlin/src/lib.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -805,15 +805,15 @@ impl<'a> wit_bindgen_core::InterfaceGenerator<'a> for InterfaceGenerator<'a> {
805805
fn type_builtin(&mut self, _id: TypeId, _name: &str, _ty: &Type, _docs: &Docs) {}
806806

807807
fn type_fixed_length_list(&mut self, id: TypeId, name: &str, ty: &Type, size: u32, docs: &Docs) {
808-
todo!()
808+
unimplemented!()
809809
}
810810

811811
fn type_future(&mut self, id: TypeId, name: &str, ty: &Option<Type>, docs: &Docs) {
812-
todo!()
812+
unimplemented!()
813813
}
814814

815815
fn type_stream(&mut self, id: TypeId, name: &str, ty: &Option<Type>, docs: &Docs) {
816-
todo!()
816+
unimplemented!()
817817
}
818818
}
819819

@@ -882,7 +882,7 @@ impl InterfaceGenerator<'_> {
882882
Type::F64 => dst.push_str("Double"),
883883
Type::String => dst.push_str("String"),
884884
Type::Id(id) => self.push_type_id_name(id, dst),
885-
Type::ErrorContext => {todo!()}
885+
Type::ErrorContext => {unimplemented!()}
886886
}
887887
}
888888

@@ -989,8 +989,8 @@ impl InterfaceGenerator<'_> {
989989
self.push_type_name(&Type::Id(*resource), dst);
990990
}
991991
TypeDefKind::Unknown => unreachable!(),
992-
TypeDefKind::Map(_, _) => {todo!()}
993-
TypeDefKind::FixedLengthList(_, _) => {todo!()}
992+
TypeDefKind::Map(_, _) => {unimplemented!()}
993+
TypeDefKind::FixedLengthList(_, _) => {unimplemented!()}
994994
}
995995
}
996996

@@ -1971,7 +1971,7 @@ impl Bindgen for FunctionBindgen<'_, '_> {
19711971
let args = operands.join(", ");
19721972
uwriteln!(self.src, "{resource_class_name}({args})");
19731973
},
1974-
FunctionKind::AsyncFreestanding | FunctionKind::AsyncMethod(_) | FunctionKind::AsyncStatic(_) => todo!("async")
1974+
FunctionKind::AsyncFreestanding | FunctionKind::AsyncMethod(_) | FunctionKind::AsyncStatic(_) => unimplemented!("async")
19751975
}
19761976
uwriteln!(self.src, "{destructure}");
19771977
}
@@ -2036,16 +2036,16 @@ impl Bindgen for FunctionBindgen<'_, '_> {
20362036
Instruction::FixedLengthListLift { .. } |
20372037
Instruction::FixedLengthListLower { .. } |
20382038
Instruction::FixedLengthListLowerToMemory { .. } |
2039-
Instruction::FixedLengthListLiftFromMemory { .. } |
2039+
Instruction::FixedLengthListLiftFromMemory { .. } => unimplemented!("FixedLengthList"),
20402040
Instruction::FutureLower { .. } |
20412041
Instruction::FutureLift { .. } |
2042+
Instruction::AsyncTaskReturn { .. } => unimplemented!("async"),
20422043
Instruction::StreamLower { .. } |
20432044
Instruction::StreamLift { .. } |
20442045
Instruction::ErrorContextLower |
20452046
Instruction::ErrorContextLift |
20462047
Instruction::Malloc { .. } |
2047-
Instruction::DropHandle { .. } |
2048-
Instruction::AsyncTaskReturn { .. } => todo!("async"),
2048+
Instruction::DropHandle { .. } => unimplemented!(),
20492049
Instruction::Flush { amt } => {
20502050
// TODO not sure this is right, this is from the "other" rebase: https://github.com/Kotlin/wit-bindgen/pull/1/changes/a175db3d9c54c715fa6ccb713b5bdfa901cca21e#diff-099a6665acb2a63446a1f595cc2d6be28c15da4e0c37bfea976ebd52648aeccfR1861-R1863
20512051
results.extend(operands.iter().take(*amt).cloned());

0 commit comments

Comments
 (0)