[Pkg-ocaml-maint-commits] [nss-passwords] 01/09: Avoid unneeded format_from_string
Stéphane Glondu
glondu at moszumanska.debian.org
Sat Sep 6 11:50:54 UTC 2014
This is an automated email from the git hooks/post-receive script.
glondu pushed a commit to branch master
in repository nss-passwords.
commit 3c9bbd04676449edec55e487cf312871e1356924
Author: Stephane Glondu <steph at glondu.net>
Date: Tue Feb 5 18:12:47 2013 +0100
Avoid unneeded format_from_string
---
main.ml | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/main.ml b/main.ml
index cad7ce8..a42d0d9 100644
--- a/main.ml
+++ b/main.ml
@@ -178,11 +178,9 @@ let () =
(0, 0, 0)
results
in
- let fmt = Printf.ksprintf
- (fun fmt -> Scanf.format_from_string fmt "%s %s %s")
- "| %%-%ds | %%-%ds | %%-%ds |\n" a b c
- in
- List.iter (fun (x, y, z) -> Printf.printf fmt x y z) results
+ List.iter (fun (x, y, z) ->
+ Printf.printf "| %-*s | %-*s | %-*s |\n" a x b y c z
+ ) results
with
| NSS_decrypt_failed(_, _, Some e) ->
Printf.eprintf "Error while decrypting: %s\n" (Printexc.to_string e);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ocaml-maint/packages/nss-passwords.git
More information about the Pkg-ocaml-maint-commits
mailing list