[gnome-builder: 6/17] Fixed code style
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder: 6/17] Fixed code style
- Date: Mon, 22 Jun 2020 19:23:06 +0000 (UTC)
commit 0141c6bd1d4e3d4ef559d40ddbf352f64f7ae4d8
Author: Günther Wagner <info gunibert de>
Date: Mon May 18 20:34:04 2020 +0200
Fixed code style
src/plugins/rust-analyzer/rust-analyzer-completion-provider.c | 2 +-
src/plugins/rust-analyzer/rust-analyzer-service.c | 5 +++--
src/plugins/rust-analyzer/rust-analyzer-transfer.c | 5 +++--
3 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/src/plugins/rust-analyzer/rust-analyzer-completion-provider.c
b/src/plugins/rust-analyzer/rust-analyzer-completion-provider.c
index d45576f53..49cf51a23 100644
--- a/src/plugins/rust-analyzer/rust-analyzer-completion-provider.c
+++ b/src/plugins/rust-analyzer/rust-analyzer-completion-provider.c
@@ -47,7 +47,7 @@ static void
rust_analyzer_completion_provider_load (IdeCompletionProvider *self,
IdeContext *context)
{
- RustAnalyzerService *service = NULL;
+ RustAnalyzerService *service;
g_assert (RUST_IS_ANALYZER_COMPLETION_PROVIDER (self));
g_assert (IDE_IS_CONTEXT (context));
diff --git a/src/plugins/rust-analyzer/rust-analyzer-service.c
b/src/plugins/rust-analyzer/rust-analyzer-service.c
index 08e5340fa..f770ac32f 100644
--- a/src/plugins/rust-analyzer/rust-analyzer-service.c
+++ b/src/plugins/rust-analyzer/rust-analyzer-service.c
@@ -229,7 +229,7 @@ rust_analyzer_service_lsp_started (IdeSubprocessSupervisor *supervisor,
IdeSubprocess *subprocess,
gpointer user_data)
{
- RustAnalyzerService *self = RUST_ANALYZER_SERVICE (user_data);
+ RustAnalyzerService *self = user_data;
g_autoptr(GIOStream) io_stream = NULL;
GInputStream *input;
GOutputStream *output;
@@ -260,7 +260,8 @@ static gboolean
rust_analyzer_service_check_rust_analyzer_bin (RustAnalyzerService *self)
{
/* Check if `rust-analyzer` can be found on PATH or if there is an executable
- in typical location */
+ * in typical location
+ */
g_autoptr(GFile) rust_analyzer_bin_file = NULL;
g_autofree gchar *rust_analyzer_bin = NULL;
g_autoptr(GFileInfo) file_info = NULL;
diff --git a/src/plugins/rust-analyzer/rust-analyzer-transfer.c
b/src/plugins/rust-analyzer/rust-analyzer-transfer.c
index 3c59b659f..09d2c929e 100644
--- a/src/plugins/rust-analyzer/rust-analyzer-transfer.c
+++ b/src/plugins/rust-analyzer/rust-analyzer-transfer.c
@@ -106,17 +106,18 @@ _download_lsp (GObject *source_object,
gpointer user_data)
{
g_autoptr(IdeTask) task = IDE_TASK (user_data);
- SoupRequest *request = SOUP_REQUEST (source_object);
g_autoptr(GFile) file = NULL;
g_autoptr(GError) error = NULL;
+ SoupRequest *request = (SoupRequest *)source_object;
GInputStream *stream = NULL;
DownloadData *data;
- IdeTransfer *transfer = IDE_TRANSFER (ide_task_get_task_data (task));
+ IdeTransfer *transfer = ide_task_get_task_data (task);
IDE_ENTRY;
g_return_if_fail (SOUP_IS_REQUEST (request));
g_return_if_fail (IDE_IS_TASK (task));
+ g_return_if_fail (IDE_IS_TRANSFER (transfer));
stream = soup_request_send_finish (request, result, &error);
if (error != NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]