Use Option instead of once/empty.

This commit is contained in:
Stephen Chung
2022-06-11 16:01:15 +08:00
parent 8999872d62
commit b9cbeb65d6
7 changed files with 34 additions and 30 deletions

View File

@@ -28,9 +28,9 @@ pub trait FuncArgs {
///
/// impl FuncArgs for Options {
/// fn parse<ARGS: Extend<Dynamic>>(self, args: &mut ARGS) {
/// args.extend(std::iter::once(self.foo.into()));
/// args.extend(std::iter::once(self.bar.into()));
/// args.extend(std::iter::once(self.baz.into()));
/// args.extend(Some(self.foo.into()));
/// args.extend(Some(self.bar.into()));
/// args.extend(Some(self.baz.into()));
/// }
/// }
///