Skip to content

why does --type toml includes results with .lock ? #2537

Answered by BurntSushi
mtb0x1 asked this question in Q&A
Discussion options

You must be logged in to vote

It's because Cargo.lock uses a TOML format. The file type filter is meant to be a model of what the underlying file actually is, and not necessarily an abbreviation for a specific extension. For example, the c type includes both *.c and *.h. They are both C files.

This is why the toml type uses Cargo.lock spelled out specifically and not *.lock, since not all lock files use the TOML format.

See:

("toml", &["*.toml", "Cargo.lock"]),

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@mtb0x1
Comment options

@BurntSushi
Comment options

@mtb0x1
Comment options

Answer selected by BurntSushi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants