{"push_id":1766414929,"size":4,"distinct_size":4,"ref":"refs/heads/textwrap","head":"12282e10510754ff5f455e65d638648df3643ee9","before":"bf0b1579147274ab5c0b086cf0a8c5ed19ca40d6","commits":[{"sha":"dd4c41e23785322f001d6c432596c649940596cf","author":{"name":"Martin Geisler","email":"ea98e1d0a9a4d10e3af04e16be88050749615623@geisler.net"},"message":"cargo: restrict unicode-segmentation to ~1.1.0\n\nThe newly released version 1.2.0 of unicode-segmentation adds code\nthat use the \"?\" operator, which in turn requires Rust 1.13.0.\nHowever, clap currently still works with Rust 1.11.0 and this caused\nbuild failures:\n\n  https://travis-ci.org/kbknapp/clap-rs/jobs/235010822\n\nThe changes since 1.1.0 seem to be related cursors/iterators and I\nthink clap can work fine without them.","distinct":true,"url":"https://api.github.com/repos/mgeisler/clap-rs/commits/dd4c41e23785322f001d6c432596c649940596cf"},{"sha":"946b76331294365eb624a2fc5aba3c16b7feef28","author":{"name":"Martin Geisler","email":"ea98e1d0a9a4d10e3af04e16be88050749615623@geisler.net"},"message":"tests: benchmark building ripgrep help text\n\nThe ripgrep benchmarks work with lots of options and have really long\nhelp texts. This makes them a good fit for judging the overall time it\ntakes to construct and format the help text.","distinct":true,"url":"https://api.github.com/repos/mgeisler/clap-rs/commits/946b76331294365eb624a2fc5aba3c16b7feef28"},{"sha":"d0699aa214c8d826cb437a53a45f9bb80e01f610","author":{"name":"Martin Geisler","email":"ea98e1d0a9a4d10e3af04e16be88050749615623@geisler.net"},"message":"tests: add wrap_help test with significant whitepace\n\nThis adds a test for the issue #617 about keeping whitespace intact in\nmanually aligned text.","distinct":true,"url":"https://api.github.com/repos/mgeisler/clap-rs/commits/d0699aa214c8d826cb437a53a45f9bb80e01f610"},{"sha":"12282e10510754ff5f455e65d638648df3643ee9","author":{"name":"Martin Geisler","email":"ea98e1d0a9a4d10e3af04e16be88050749615623@geisler.net"},"message":"feat: use textwrap crate for wrapping help texts\n\nThe textwrap crate uses a simpler linear-time algorithm for wrapping\nthe text. The current algorithm in wrap_help uses several O(n) calls\nto String::insert and String::remove, which makes it potentially\nquadratic in complexity.\n\nComparing the 05_ripgrep benchmark at commits textwrap~2 and textwrap\ngives this result on my machine:\n\n name              before ns/iter  after ns/iter  diff ns/iter   diff %\n build_app_long    22,101          21,099               -1,002   -4.53%\n build_app_short   22,138          21,205                 -933   -4.21%\n build_help_long   514,265         284,467            -229,798  -44.68%\n build_help_short  85,720          85,693                  -27   -0.03%\n parse_clean       23,471          22,859                 -612   -2.61%\n parse_complex     29,535          28,919                 -616   -2.09%\n parse_lots        422,815         414,577              -8,238   -1.95%\n\nAs part of this commit, the wrapping_newline_chars test was updated.\nThe old algorithm had a subtle bug where it would break lines too\nearly. That is, it wrapped the text like\n\n    ARGS:\n        <mode>    x, max, maximum   20 characters, contains\n                  symbols.\n                  l, long           Copy-friendly,\n                  14 characters, contains symbols.\n                  m, med, medium    Copy-friendly, 8\n                  characters, contains symbols.\";\n\nwhen it should really have wrapped it like\n\n    ARGS:\n        <mode>    x, max, maximum   20 characters, contains\n                  symbols.\n                  l, long           Copy-friendly, 14\n                  characters, contains symbols.\n                  m, med, medium    Copy-friendly, 8\n                  characters, contains symbols.\";\n\nNotice how the word \"14\" was incorrectly moved to the next line. There\nis clearly room for the word on the line with the \"l, long\" option\nsince there is room for \"contains\" just above it.\n\nI'm not sure why this is, but the algorithm in textwrap handles this\ncase correctly.","distinct":true,"url":"https://api.github.com/repos/mgeisler/clap-rs/commits/12282e10510754ff5f455e65d638648df3643ee9"}]}
{"actor":{"display_login":"mgeisler"}}