Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Trac
Trac
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Issue Boards

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • Legacy
  • TracTrac
  • Issues
  • #27207

Closed (moved)
Open
Opened 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 admin enable hashed storage. More information
Assignee
Assign to
Tor: unspecified
Milestone
Tor: unspecified
Assign milestone
Time tracking
None
Due date
None
Reference: legacy/trac#27207