chiark / gitweb /
Give File an infallible constructor.
authorSimon Tatham <anakin@pobox.com>
Fri, 26 Jan 2024 12:53:49 +0000 (12:53 +0000)
committerSimon Tatham <anakin@pobox.com>
Sat, 27 Jan 2024 09:08:30 +0000 (09:08 +0000)
commit654e626e7cd61eec54ff599fee4bdbb7f3cc591b
tree1cce565b10561279847ea3224470e684631197e5
parentbc7d90793bbb5aba22e51bc689a6a7ff9df309e3
Give File an infallible constructor.

This is useful for data sources whose init() method doesn't actually
need to do anything, because it allows the function constructing one
to statically know that no error will be raised, and not have to write
an ugly unwrap().
src/file.rs