Commit 3afe8cc7 authored by Roland Bock's avatar Roland Bock Committed by Commit Bot

[mojo][doc] Remove obsolete bool return value

Returning an optional struct which is only filled in case the call is
successful does not require an extra bool to indicate success.
The change removes said bool.

This is a documentation-only change.

Change-Id: If7406703e0cbd91a77c590383ea3430978d1c9fc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2523174Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#825075}
parent 3ac76955
......@@ -64,8 +64,9 @@ interface Teleporter {
TeleportGoat(Goat) = ();
TeleportPlant(Plant) => ();
// TeleportStats is only non-null if success is true.
GetStats() => (bool success, TeleporterStats?);
// TeleporterStats will be have a value if and only if the call was
// successful.
GetStats() => (TeleporterStats?);
};
```
......@@ -78,7 +79,7 @@ interface Teleporter {
// supposed to only pass one non-null argument per call?
Teleport(Animal?, Fungi?, Goat?, Plant?) => ();
// Does this return all stats if sucess is true? Or just the categories that
// Does this return all stats if success is true? Or just the categories that
// the teleporter already has stats for? The intent is uncertain, so wrapping
// the disparate values into a result struct would be cleaner.
GetStats() =>
......@@ -114,11 +115,9 @@ interface Teleporter {
TeleportGoat(Goat) => ();
TeleportPlant(Plant) => ();
// Returns current teleportation stats. On failure (e.g. a teleportation
// operation is currently in progress) success will be false and a null stats
// object will be returned.
GetStats() =>
(bool success, TeleportationStats?);
// Returns current teleporter stats. On failure (e.g. a teleportation
// operation is currently in progress) a null stats object will be returned.
GetStats() => (TeleporterStats?);
};
```
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment