Mercurial > hg
view .editorconfig @ 45607:75f785888a7b
rust-matchers: make `Matcher` trait object-safe
Before this patch, it is not possible to create a `Matcher` trait-object (like
`Box<dyn Matcher>`), because of the use of a generic parameters in some methods,
namely `impl AsRef<HgPath>`.
While this makes the interface less flexible for callers in theory, it does not
change anything in the current codebase.
Until something like [1] is implemented, this is a "tradeoff" that we need to
make anyway.
[1] https://internals.rust-lang.org/t/pre-rfc-expand-object-safety/12693
Differential Revision: https://phab.mercurial-scm.org/D9071
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Wed, 23 Sep 2020 10:02:16 +0200 |
parents | c25efc468a49 |
children |
line wrap: on
line source
# See http://EditorConfig.org for the specification root = true [*.py] indent_size = 4 indent_style = space trim_trailing_whitespace = true end_of_line = lf [*.{c,h}] indent_size = 8 indent_style = tab trim_trailing_whitespace = true end_of_line = lf [*.t] indent_size = 2 indent_style = space trim_trailing_whitespace = false end_of_line = lf