Coder Social home page Coder Social logo

Failing compilation about dezoomify-rs HOT 8 CLOSED

lovasoa avatar lovasoa commented on May 29, 2024
Failing compilation

from dezoomify-rs.

Comments (8)

technodrome avatar technodrome commented on May 29, 2024 1

Amazing work, first class suport :)
A big thank you for such attitude!

from dezoomify-rs.

lovasoa avatar lovasoa commented on May 29, 2024

Hello,
I cannot reproduce this issue. Did you make any change to the code ?
The code is compiled with rust 1.42.0 on every commit on macos, windows, and linux, and the compilation works:
https://github.com/lovasoa/dezoomify-rs/runs/525952748?check_suite_focus=true

from dezoomify-rs.

lovasoa avatar lovasoa commented on May 29, 2024

Can you provide a copy of the exact sequence of commands you use to install rust, clone the code, and compile it ?

from dezoomify-rs.

lovasoa avatar lovasoa commented on May 29, 2024

Hmm... I think I guessed your mistake ! Your error message mentions progress.finish_with_message(&final_msg); being on line 263, whereas in the real code, it is on line 262. This means you added a line above in the code.

Given what you mention, my guess is that you added something like success = true; on line 254.

A statement that ends with a ; returns () in rust, meaning that your code is trying to put () into final_msg, which should be a string.

Next time, please provide the code you are trying to compile when reporting a compilation error 😉

And, about your original idea: it sounds like a good idea to me ! Do you want to make a PR ?

from dezoomify-rs.

technodrome avatar technodrome commented on May 29, 2024

Thank you for your hint and sorry about a bit of confusion - I've literally just started with Rust :)

I do think having return value reflect the actual result of the download operation opens many possibilities. I'd love to implement this but I am just starting with Rust and it would take quite long. If I manage to implement this, I will be sure to open a PR.

from dezoomify-rs.

lovasoa avatar lovasoa commented on May 29, 2024

Here is the link to the part of the rust guide about if : https://doc.rust-lang.org/reference/expressions/if-expr.html
What is important and differs from most languages is that if blocks are expressions :

let result = if condition { "hello" } else { x = 1; } 

is not valid, because the if branch has the type &str and the else branch has the type ()

Do not hesitate to submit your PR now even if it's not ready (you can annotate it as Work In Progress), so that we can discuss it.

from dezoomify-rs.

lovasoa avatar lovasoa commented on May 29, 2024

I made the change: starting with dezoomify-rs v1.8.4, dezoomify-rs will use a non-zero exit code when only some tiles could be downloaded.

from dezoomify-rs.

lovasoa avatar lovasoa commented on May 29, 2024

Thank you for using the tool and reporting bugs !

from dezoomify-rs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.