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 {
105105 self . build ( )
106106 }
107107
108- /// Builds shader crate locally using [`SpirvBuilder`].
108+ /// Builds shader crate using [`SpirvBuilder`].
109109 fn build ( & self ) -> anyhow:: Result < ( ) > {
110110 crate :: user_output!(
111111 "Compiling shaders at {}...\n " ,
@@ -117,7 +117,7 @@ impl Build {
117117 }
118118
119119 /// 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.
121121 fn watch ( & self ) -> anyhow:: Result < ( ) > {
122122 #[ cfg( feature = "watch" ) ]
123123 {
@@ -130,13 +130,13 @@ impl Build {
130130 accept. submit ( parse_result) ;
131131 }
132132 } ) ?
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" )
136136 }
137137
138138 #[ cfg( not( feature = "watch" ) ) ]
139- unreachable ! ( "cannot watch without the `watch` feature" )
139+ anyhow :: bail !( "cannot watch for changes without the `watch` feature" )
140140 }
141141
142142 /// Parses compilation result from [`SpirvBuilder`] and writes it out to a file
You can’t perform that action at this time.
0 commit comments