Fix more warnings
This commit is contained in:
parent
8f3ea6ccb3
commit
12fe64b177
1 changed files with 43 additions and 48 deletions
|
@ -250,7 +250,7 @@ fn main() {
|
||||||
cx: &mut AppContext,
|
cx: &mut AppContext,
|
||||||
) {
|
) {
|
||||||
let task = workspace::open_paths(&paths, &app_state, None, cx);
|
let task = workspace::open_paths(&paths, &app_state, None, cx);
|
||||||
cx.spawn(|cx| async move {
|
cx.spawn(|_| async move {
|
||||||
if let Some((_window, results)) = task.await.log_err() {
|
if let Some((_window, results)) = task.await.log_err() {
|
||||||
for result in results {
|
for result in results {
|
||||||
if let Some(Err(e)) = result {
|
if let Some(Err(e)) = result {
|
||||||
|
@ -311,10 +311,7 @@ fn main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
let app_state = app_state.clone();
|
let app_state = app_state.clone();
|
||||||
let closure_client = client.clone();
|
cx.spawn(move |cx| async move {
|
||||||
cx.spawn(move |mut cx| {
|
|
||||||
let client = closure_client.clone();
|
|
||||||
async move {
|
|
||||||
while let Some(request) = open_rx.next().await {
|
while let Some(request) = open_rx.next().await {
|
||||||
match request {
|
match request {
|
||||||
OpenRequest::Paths { paths } => {
|
OpenRequest::Paths { paths } => {
|
||||||
|
@ -346,8 +343,7 @@ fn main() {
|
||||||
let app_state = app_state.clone();
|
let app_state = app_state.clone();
|
||||||
let open_notes_task = cx.spawn(|mut cx| async move {
|
let open_notes_task = cx.spawn(|mut cx| async move {
|
||||||
let workspace_window =
|
let workspace_window =
|
||||||
workspace::get_any_active_workspace(app_state, cx.clone())
|
workspace::get_any_active_workspace(app_state, cx.clone()).await?;
|
||||||
.await?;
|
|
||||||
let _ = workspace_window
|
let _ = workspace_window
|
||||||
.update(&mut cx, |_, cx| {
|
.update(&mut cx, |_, cx| {
|
||||||
ChannelView::open(channel_id, cx.view().clone(), cx)
|
ChannelView::open(channel_id, cx.view().clone(), cx)
|
||||||
|
@ -360,7 +356,6 @@ fn main() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
})
|
})
|
||||||
.detach();
|
.detach();
|
||||||
|
|
||||||
|
@ -773,7 +768,7 @@ async fn watch_languages(fs: Arc<dyn fs::Fs>, languages: Arc<LanguageRegistry>)
|
||||||
fn watch_file_types(fs: Arc<dyn fs::Fs>, cx: &mut AppContext) {
|
fn watch_file_types(fs: Arc<dyn fs::Fs>, cx: &mut AppContext) {
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
cx.spawn(|mut cx| async move {
|
cx.spawn(|cx| async move {
|
||||||
let mut events = fs
|
let mut events = fs
|
||||||
.watch(
|
.watch(
|
||||||
"assets/icons/file_icons/file_types.json".as_ref(),
|
"assets/icons/file_icons/file_types.json".as_ref(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue