File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
crates/cargo-gpu-cache/src Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ impl Build {
105
105
self . build ( )
106
106
}
107
107
108
- /// Builds shader crate locally using [`SpirvBuilder`].
108
+ /// Builds shader crate using [`SpirvBuilder`].
109
109
fn build ( & self ) -> anyhow:: Result < ( ) > {
110
110
crate :: user_output!(
111
111
"Compiling shaders at {}...\n " ,
@@ -117,7 +117,7 @@ impl Build {
117
117
}
118
118
119
119
/// Watches shader crate for changes using [`SpirvBuilder`]
120
- /// or panics depending on presence of `watch` feature.
120
+ /// or returns an error depending on presence of `watch` feature.
121
121
fn watch ( & self ) -> anyhow:: Result < ( ) > {
122
122
#[ cfg( feature = "watch" ) ]
123
123
{
@@ -130,13 +130,13 @@ impl Build {
130
130
accept. submit ( parse_result) ;
131
131
}
132
132
} ) ?
133
- . context ( "unreachable" ) ?? ;
134
- std :: thread :: park ( ) ;
135
- Ok ( ( ) )
133
+ . context ( "should always return the first compile result" )
134
+ . flatten ( ) ? ;
135
+ anyhow :: bail! ( "unexpected end of watch" )
136
136
}
137
137
138
138
#[ cfg( not( feature = "watch" ) ) ]
139
- unreachable ! ( "cannot watch without the `watch` feature" )
139
+ anyhow :: bail !( "cannot watch for changes without the `watch` feature" )
140
140
}
141
141
142
142
/// Parses compilation result from [`SpirvBuilder`] and writes it out to a file
You can’t perform that action at this time.
0 commit comments