File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
opentelemetry-sdk/src/metrics Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ pub fn new_view(criteria: Instrument, mask: Stream) -> MetricResult<Box<dyn View
110110 let contains_wildcard = criteria. name . contains ( [ '*' , '?' ] ) ;
111111
112112 let match_fn: Box < dyn Fn ( & Instrument ) -> bool + Send + Sync > = if contains_wildcard {
113- if ! mask. name . is_none ( ) {
113+ if mask. name . is_some ( ) {
114114 // TODO - The error is getting lost here. Need to return or log.
115115 return Ok ( Box :: new ( empty_view) ) ;
116116 }
@@ -144,17 +144,17 @@ pub fn new_view(criteria: Instrument, mask: Stream) -> MetricResult<Box<dyn View
144144 Ok ( Box :: new ( move |i : & Instrument | -> Option < Stream > {
145145 if match_fn ( i) {
146146 Some ( Stream {
147- name : if ! mask. name . is_none ( ) {
147+ name : if mask. name . is_some ( ) {
148148 mask. name . clone ( )
149149 } else {
150150 Some ( i. name . clone ( ) )
151151 } ,
152- description : if ! mask. description . is_none ( ) {
152+ description : if mask. description . is_some ( ) {
153153 mask. description . clone ( )
154154 } else {
155155 Some ( i. description . clone ( ) )
156156 } ,
157- unit : if ! mask. unit . is_none ( ) {
157+ unit : if mask. unit . is_some ( ) {
158158 mask. unit . clone ( )
159159 } else {
160160 Some ( i. unit . clone ( ) )
You can’t perform that action at this time.
0 commit comments