chiark / gitweb /
Turn FileType::get_from_client into an &self method.
authorSimon Tatham <anakin@pobox.com>
Fri, 26 Jan 2024 08:48:04 +0000 (08:48 +0000)
committerSimon Tatham <anakin@pobox.com>
Fri, 26 Jan 2024 12:40:11 +0000 (12:40 +0000)
commit2f9fe150d516888873e3344a3150fb24256aa824
tree645bee395d486eaf0477042fbae2dda14953e1a6
parent2248b1622db9730b998a3e19b61c6503890d9e33
Turn FileType::get_from_client into an &self method.

This enables the FileType object itself to store information about
where its data comes from, instead of _necessarily_ being constrained
to get it from the client.

Therefore, I've also renamed it, so that the method name doesn't imply
that the data always lives in the client.

This also means that every call to FileContents::update_items() must
pass through the FileType from its owning File, but that's no trouble.
src/file.rs