Remove non-determinism from autosave after delay

Antonio Scandurra created

Change summary

crates/editor/src/editor.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Detailed changes

crates/editor/src/editor.rs 🔗

@@ -5596,9 +5596,9 @@ impl Editor {
                             .timer(Duration::from_millis(milliseconds))
                             .fuse();
                         pending_autosave.await;
-                        futures::select! {
-                            _ = timer => {}
+                        futures::select_biased! {
                             _ = cancel_rx => return None,
+                            _ = timer => {}
                         }
 
                         this.upgrade(&cx)?