The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,915 other followers

Archive for September 16th, 2022

Rust is jet another language allowing assigning to _ for discarding assignment results (like function calls)

Posted by jpluimers on 2022/09/16

Rust is a programming language that very much emphasises safety.

One of the cornerstones is that it warns on constructs that might lose information or make object lifetime unclear.

An example is discarding function results: historically you will get a warning like warning: unused `std::result::Result` that must be used that you can resolve by applying a let statement assigning to the _ underscore pattern which will be discarded at the end of the statement like this:

Read the rest of this entry »

Posted in Development, Rust, Software Development | Leave a Comment »

 
%d bloggers like this: