Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #27207

Closed (moved)
(moved)
Open
Created Aug 19, 2018 by Trac@tracbot

Examples in CodingStandardsRust.md are wrong

The section on CString is incorrect:

  • CString::new("bl\x00ah").unwrap().into_raw() will panic in the 'unwrap' call, it will never return a pointer of any kind, dangling or otherwise.

Also, 12cf04646c571646b726e697d66ecafad7886cf2 seems to be the result of some miscommunication with withoutboats:

  • .expect() is literally '.unwrap(), but with a custom panic message,' it doesn't return an Option and is no safer than unwrap, but it is self-documenting.

Trac:
Username: cyberpunks

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking