Skip to content
#

Rust

rust logo

Rust is a systems programming language created by Mozilla. It is similar to C++, but is designed for improved memory safety without sacrificing performance.

Here are 15,705 public repositories matching this topic...

dbdr
dbdr commented Apr 27, 2020

I expected comparing a [u8; 4] to [0; 4] to generate code identical to testing a u32 is 0, and indeed it is the case when comparing values. However when dereferencing is involved the code is longer:

pub fn test_u32_ref(data: &u32) -> bool {
    *data == 0
}

pub fn test_u8array_ref(data: &[u8; 4]) -> bool {
    *data == [0; 4]
}

gives:

example::test_u32_ref:
        cmp  
alacritty
davidmogar
davidmogar commented Apr 28, 2020

By default, the binding Shift-Backspace deletes the previous word. This is not the case for other terminals or when you do the same in any input. There, only the previous character is removed.

I added the following lines to my alacritty.yml:

key_bindings:
     - { key: Back, mods: Shift, action: None }

This is not a solution as it doesn't delete any character, but at least

bat
yaahc
yaahc commented Apr 27, 2020

As far as I can tell bat as a library only supports writing to stdout, I'm interested in seeing if I can integrate bat with color-backtrace/color-spantrace and eyre. To do this I need bat to write to a std::fmt::Formatter and return a fmt::Result instead of printing to stdout (i assume?) and returning a bat::error::Error.

So assuming I'm not misreading the docs...

Proposal

jean-airoldie
jean-airoldie commented Jun 6, 2019

Here is some general documentation improvement suggestion regarding flatbuffers. This is what I remember struggling with (from the top of my head). Also some point might be a little bit opinionated.

Some of the points were taken from #5387.

  • Regarding the builder:
    • The fact that its kinda like an arena allocator used for serialization.
    • The concept of offsets, what do they repre
jackpot51
jackpot51 commented Nov 4, 2016

For every scheme a fully running kernel has, the following functions need to be documented, if implemented. In addition, the Scheme and SchemeMut traits should be documented with usage and the default operation.

Documentation should include usage, what access restrictions there are, what paths and dup arguments are valid, and what errors may be returned.

Path Operations

  • open
yew
matkoniecz
matkoniecz commented Dec 8, 2019

Is it a suitable start for someone with 0 Rust experience? (my guess: yes, but it is a guess and it turned out to be wrong)

small exercises to get you used to reading and writing Rust code

indicates that it is for beginners, but it is unclear is it for someone just starting from hello world.

Alternatively, for a first-time Rust learner, there's several other resources:

Is it suppos

dsherret
dsherret commented Dec 27, 2019

I wanted to make the following recommendations on the AST node names for import specifiers:

  • ImportDefault -> ImportDefaultSpecifier
  • ImportStarAs -> ImportStarAsSpecifier (or ImportNamespaceSpecifier as babel calls it?)
  • ImportSpecific -> ImportNamedSpecifier

The comments for these should also probably be updated (ex. on ImportDefault it should go from /// e.g. import

shafreeck
shafreeck commented Mar 5, 2020

Feature Request

Is your feature request related to a problem? Please describe:

To ensure a secure and responsible disclosure of security vulnerabilities, it is important
to have a dedicated point of contact. This person/team should be known, meaning that
all necessary information such as an email address and preferably also encryption

jzaefferer
jzaefferer commented May 2, 2020

Is your feature request related to a problem? Please describe.
To open files in their associated apps, different OSes have different native commands: open on OSX, start on Windows, xdg-open on Linux. A nushell command to enscapulate those different commands would fill a gap and avoid using external commands.

Describe the solution you'd like

A command like open (on OSX), but

devjgm
devjgm commented Jan 20, 2020

Is your feature request related to a problem? Please describe.
No.

Describe the solution you'd like
I'd like the source code to be automatically clang-formatted according to my settings anytime the code is compiled. That is, don't require me to use the contextual menu or keyboard shortcut to format the code. Just auto-format it; just like the code is auto-compiled too.

Well, ther

MOZGIII
MOZGIII commented Jul 27, 2019

I'd like to use CONNECT method with HTTP (at least with 1.1, and, ideally with 2).

However, I don't think there's a way to unwrap the underlying stream from HTTP response.

Practically, I need an object that implements futures::io::AsyncRead and futures::io::AsyncWrite (from futures 0.3). Similar thing via tokio should work too.

Created by Graydon Hoare

Released 2010

Organization
rust-lang
Website
www.rust-lang.org
Wikipedia
Wikipedia

Related Topics

c-plus-plus language
You can’t perform that action at this time.