-
Notifications
You must be signed in to change notification settings - Fork 326
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stop passing a nullable value to Future<nn-type>.value or Completer<n…
…n-type>.completer (#6228) * Stop passing a nullable value to Future<nn-type>.value or Completer<nn-type>.completer. This is cleanup work required to start enforcing this with static analysis, as per dart-lang/sdk#53253. Real quick this issue is that this code is unsafe: ```dart void f(Completer<int> c, int? i) { Future<int>.value(i); // Ouch! c.complete(i); // Ouch! } ``` The typical fix is to add a null-assert (`!`), but sometimes a more appropriate or safer fix can be made. * Use non-nullable CpuSamples
- Loading branch information
Showing
3 changed files
with
10 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters