Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes two compliation warnings #2968

Merged
merged 1 commit into from
Jul 4, 2023

Conversation

sighingnow
Copy link
Collaborator

What do these changes do?

warning: unused return value of `std::boxed::Box::<T>::from_raw` that must be used
   --> /Users/runner/work/GraphScope/GraphScope/interactive_engine/executor/engine/pegasus/pegasus/src/communication/buffer.rs:121:13
    |
121 |             Box::from_raw(ptr.as_ptr());
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: call `drop(Box::from_raw(ptr))` if you intend to drop the `Box`
    = note: `#[warn(unused_must_use)]` on by default
help: use `let _ = ...` to ignore the resulting value
    |
121 |             let _ = Box::from_raw(ptr.as_ptr());
    |             +++++++
   Compiling pegasus_server v0.1.0 (/Users/runner/work/GraphScope/GraphScope/interactive_engine/executor/engine/pegasus/server)
warning: `pegasus` (lib) generated 1 warning
   Compiling timely v0.10.0
   Compiling env_logger v0.7.1
   Compiling itertools v0.9.0
   Compiling titlecase v1.1.0
   Compiling serde_bytes v0.11.10
   Compiling futures-io v0.3.28
   Compiling futures v0.3.28
   Compiling graph_store v0.2.0 (/Users/runner/work/GraphScope/GraphScope/interactive_engine/executor/store/exp_store)
warning: for loop over an `Option`. This is more readably written as an `if let` statement
  --> /Users/runner/work/GraphScope/GraphScope/interactive_engine/executor/store/exp_store/src/graph_db/csr_topo.rs:47:24
   |
47 |             for vec in adj.get_mut(&label) {
   |                        ^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(for_loops_over_fallibles)]` on by default
help: to check pattern in a loop use `while let`
   |
47 |             while let Some(vec) = adj.get_mut(&label) {
   |             ~~~~~~~~~~~~~~~   ~~~
help: consider using `if let` to clear intent
   |
47 |             if let Some(vec) = adj.get_mut(&label) {
   |             ~~~~~~~~~~~~   ~~~
warning: `graph_store` (lib) generated 1 warning

Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
@sighingnow sighingnow requested a review from BingqingLyu July 4, 2023 03:07
@codecov-commenter
Copy link

Codecov Report

Merging #2968 (090b1cd) into main (7fc14b5) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2968   +/-   ##
=======================================
  Coverage   42.37%   42.37%           
=======================================
  Files          99       99           
  Lines       10649    10649           
=======================================
  Hits         4512     4512           
  Misses       6137     6137           

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cb27df4...090b1cd. Read the comment docs.

@sighingnow sighingnow merged commit c27f459 into alibaba:main Jul 4, 2023
@sighingnow sighingnow deleted the ht/fix-gie-warning branch July 4, 2023 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants