rusticata / der-parser

BER/DER parser written in pure Rust. Fast, zero-copy, safe.
Apache License 2.0
85 stars 28 forks source link

Improve Oid documentation and make Oid::from const fn #24

Closed jannschu closed 4 years ago

jannschu commented 4 years ago

See rusticata/asn1-rs#20.

chifflier commented 4 years ago

Note: this breaks rustfmt (I can fix it).

To avoid that, I suggest to add something to your .git/hooks/pre-push file.I use:

#!/bin/sh 
remote="$1"                                                                        
url="$2"

if [ -f Cargo.toml ] && cargo sync-readme -V >/dev/null 2>&1; then
    echo "[+] check sync-readme"
    if ! cargo sync-readme -c; then
        exit 1
    fi
fi
if [ -f Cargo.toml ] && cargo fmt --version >/dev/null 2>&1; then
    echo "[+] check rustfmt"
    if ! cargo fmt --all -- --check; then
        exit 2
    fi
fi

exit 0
chifflier commented 4 years ago

Merged, with some modifications (rustfmt), in f0bd012 and 3d309c5 Thanks!