We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 768da6e commit 6c984e4Copy full SHA for 6c984e4
source/vstd/std_specs/option.rs
@@ -7,6 +7,25 @@ use core::option::Option::Some;
7
8
verus! {
9
10
+impl<T> View for Option<T> {
11
+ type V = Option<T>;
12
+
13
+ open spec fn view(&self) -> Option<T> {
14
+ *self
15
+ }
16
+}
17
18
+impl<T: DeepView> DeepView for Option<T> {
19
+ type V = Option<T::V>;
20
21
+ open spec fn deep_view(&self) -> Option<T::V> {
22
+ match self {
23
+ Some(t) => Some(t.deep_view()),
24
+ None => None,
25
26
27
28
29
////// Add is_variant-style spec functions
30
pub trait OptionAdditionalFns<T>: Sized {
31
#[allow(non_snake_case)]
0 commit comments